1. FTP use occasion: for file transfer;
2. The role of FTP: used for file upload and download;
3. FTP belongs to tcp protocol, port number: 20, 21;
21: Control level, used for account password verification and authorization verification;
20: Data level, used for file upload and download;
4. FTP: anonymous, system, virtual account:
Anonymous account: the login name is ftp or anonymous, you can log in without verifying the password;
System account: the existing account and password are used for verification.
Verification method:
1. /etc/passwd and /etc/shadow are
verified ; 2. the user list is verified (the user must be created by the system), which is equivalent to a whitelist.
The default root account does not allow login
Virtual account: a predefined list of accounts (the system has never created it before)
5. The deployment process of FTP anonymous account:
1. Turn off the firewall and core protection, and install vsftp
2. Modify the owner and group, and create a file
3. Modify the configuration file to log in as an anonymous user
4. Turn on the ftp service and check the port number
5. Connect with the client
6. Download and upload files
6. The deployment process of FTP local users:
(1) Allow ordinary users to log in:
1. Configuration file
2. Start the service and add users to try
3. Create a file in the lisi directory
4. Connect with the client
5. Download and upload files
6, enter the host directory to view
(2) Allow whitelist users to log in:
1. Configuration file
2. Create user liming, and modify owner, group and permissions
3. Create a file under /opt/liming
4. Add a whitelist
5. Restart the service and check the port number
6. Upload and download files
7, enter the host directory to view