If FTP is required to access Linux, VSFTPD is a better FTP server under Linux.
First, check the installation vsftp
1 // Check if VSFTPD is installed 2 grep vsftpd 3 // No, install vsftpd . 4 Yum Install vsftpd 5 chkconfig vsftpd on
Second, edit the VSFTP configuration item
Configure open Virtual account (login FTP only, not login system) and set access directory
1vim/etc/vsftpd/vsftpd.conf2Anonymous_enable=no//setting does not allow anonymous access 3Local_enable=yes//set the local user to be accessible. 4Chroot_list_enable=yes//users cannot leave the home directory 5ascii_upload_enable=YES6Ascii_download_enable=yes//set upload and download features that support ASCII mode 7Pam_service_name=vsftpd//Pam Authentication file name. Pam will be certified according to/ETC/PAM.D/VSFTPD 8 9//Manually addTenGuest_enable=yes//Setting the Enable Virtual User feature One AUser_config_dir=/etc/vsftpd/vuser_conf//set up the CentOS FTP service file storage path for virtual user personal vsftp - //for Certification -chroot_list_file=/etc/vsftpd/Vuser_passwd.txt the -local_root=///setting access directory not configured by default is/var/ftp
Third, install the Berkeley DB Tool (file database, we use files to store the virtual user's account password)
Yum Install DB4 db4-utils
Four, create user password text/etc/vsftpd/vuser_passwd.txt, odd line is the user name, even line is the password
1 vim/etc/vsftpd/vuser_passwd.txt
2 Test 123456
V. Generate a DB file of virtual Virtual user account password and associate the data db file
1 db_load-t-T hash-f/etc/vsftpd/vuser_passwd.txt/etc/vsftpd/vuser_passwd.db
Edit the authentication file/etc/pam.d/vsftpd, All comments out the original statement, and then add the following two sentences
1 auth required pam_userdb.so db=/etc/vsftpd/vuser_passwd2 account required pam_userdb.so db=/etc/vsftpd/vuser_passwd
Six, restart VSFTPD service
1 Service vsftpd restart
Finally, create a new FTP connection to the FTP server
Open FTP Service under CentOS