Reference: http://www.linuxsir.org/main? Q = node/152 #8.7
Reference: http://www.phpchina.com/html/81/14881-8888.html
The reference article is well written. You can refer to it.
No need to install vsftpd, or start a service. The key is the configuration after the service is started:
My environment: centos 5.3 gnome vsftpd
1. installation:Yum install vsftpd
Ii. Start:Service vsftpd start
3. Create a user for FTP:
1. Create a user: "System | management | users and groups | users", "Add users" such as FTP, password: ftpadmin, login shell:/sbin/nologin, the following three items are "create main directory", "create private group for this user", and "manually specify user ID.
2. Modify user attributes: double-click the user and enter/mnt/winc/ftproot in the main directory. The directory is your FTP directory. Select FTP for the group and click OK.
Note: The default home directory is/home/ftp. We recommend that you change it to the actual FTP path, for example, "/mnt/winc/ftproot, because all my FTP files are in this directory;
Log on to sehll and select/sbin/nologin. This user cannot log on to the system, but can use ftp.
3. Modify SELinux parameters:
Setsebool ftpd_disable_trans 1
Service vsftpd restart
Note: If this parameter is not modified, the following message is displayed during connection:
500 Oops: cannot change Directory:/mnt/winc/ftproot *******
500 Oops: child died
In this way, FTP can be used normally...
After the user is created, a line is added to the/etc/passwd file:
Ftpadmin: X: 501: 50: ftpadmin:/mnt/winc/ftproot:/sbin/nologin