I. Install software
Yum install vsftpd
II:
# Useradd-S/sbin/nologin-D/data/ftp-g ftp ftpadmin
# Passwd ftpadmin
Note:
-S/sbin/nologin makes it unable to log on to the system
-D indicates that the user directory is/data/ftp
-G ftp: Add users to the FTP group
# Chmod-r 744/data/ftp
# Chgrp-r FTP/data/ftp
III:
Configure/etc/vsftpd. conf
Modify two items:
Note: This configuration file is only modified to the following two items based on the default configuration file:
Anonymous_enable = No # disable anonymous logon
Chroot_local_user = yes # restrict all ftp users in the system to the Home Directory
# Vi/etc/vsftpd/ftpusers comment out the root user
# Vi/etc/vsftpd/user_list use the root annotation to cancel the root logon.
To the end
Service vsftpd restart
You can.
Login: ftp: // 192.168.0.73/ftpadmin
All is OK !!!
The basic functions have been implemented so far,
However, if multiple users are required to log on to a directory with different permissions, virtual users are required.
For how to create and configure a virtual user, see youdao note.
Vsftpd configuration in centos 6.5