Configure and manage FTP server

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:
Insert picture description here
2. Enter the configuration file command:
Insert picture description here
3. Set setenforce to allow mode:
Insert picture description here
4. Start vsftp:
Insert picture description here
5. Set the service to start with the system:
Insert picture description here

6. Use a Windows client (anonymous user) to access:

	a.首页在cmd下ping一下服务器的IP是否连通
	b.在浏览器中输入(ftp://192.168.1.2)
	c.切换服务器在公共目录中创建一个文件测试:

Insert picture description here

7. Set permissions for anonymous users:
a. Change the group
Insert picture description here

b. Modify the configuration file: vim /etc/vsftpd/vsftpd.conf

Insert picture description here
8. Restart the service to make the configuration take effect:
Insert picture description here
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
Insert picture description here
-b: create and restart the service :
Insert picture description here
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"):
Insert picture description here

Commonly used global configuration items:

Insert picture description here

Common anonymous FTP configuration items:

Insert picture description here

Commonly used local user FTP configuration items:

Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_45849066/article/details/111504271