FTP connection method:
控制连接:标准端口为21,用于发送FTP命令信息
数据连接:标准端口为20,用于上传、下载数据
数据连接的建立类型“
-主动模式:服务端从20端口主动想客户端发起连接
-被动模式:服务端在指定范围内某个端口被动等待客户端发起连接
FTP transmission method:
Text mode: ASCII mode, transfer data in a text sequence Binary mode: Binary mode, transfer data in a binary sequence
vsftp operation:
1. Installation:
2. Enter the configuration file command:
3. Set setenforce to allow mode:
4. Start vsftp:
5. Set the service to start with the system:
6. Use a Windows client (anonymous user) to access:
a.首页在cmd下ping一下服务器的IP是否连通
b.在浏览器中输入(ftp://192.168.1.2)
c.切换服务器在公共目录中创建一个文件测试:
7. Set permissions for anonymous users:
a. Change the group
b. Modify the configuration file: vim /etc/vsftpd/vsftpd.conf
8. Restart the service to make the configuration take effect:
9. Log in as a local user, after logging in, it is in the home directory.
10. Realize local user resource sharing:
-a: vim /etc/vsftpd/vsftpd.conf
-b: create and restart the service :
11. Solve the problem of upload permissions (create a new group, add local users to this group and modify permissions, you can create a new upload directory as the upload file "the new users who want to upload must also join this group"):