the practice of using Baidu Server centos/7.1 x86_64 (64bit)
vsftpd:version 3.0.2
filezilla_win64_3.14.1.0.1454131478 Install VSFTPD
1. First confirm that there is no vsftpd in the system.
Rpm-qa|grep vsftpd
If anything, it will show vsftpd-x.x.x.-x.xxx.x86_64.
If they don't, they'll come back empty.
2. Install VSFTPD
Yum-y Install VSFTPD
3. Set Boot up
Chkconfig vsftpd on configuration vsftpd
1. Open VSFTPD configuration file/etc/vsftpd/vsftpd.conf
Cd/etc/vsftpd
VI vsftpd.conf
.
Anonymous_enable=no//settings do not allow anonymous access
Local_enable=yes//set for local users to access. Note: If you use a virtual host user, all virtual users will not be able to access the project if it is set to No
Chroot_list_enable=yes//user cannot leave home directory
Chroot_list_file=/etc/vsftpd/chroot_list Ascii_upload_enable=yes
Ascii_download_enable=yes//Set to support ASCII mode upload and download function
PAM_SERVICE_NAME=VSFTPD//pam Authentication file name. Pam will be certified according to/ETC/PAM.D/VSFTPD
Three have been added manually in the configuration file
Guest_enable=yes//Set Enable Virtual User feature
GUEST_USERNAME=FTP//Specifies the host user of the virtual user, and there is already a built-in FTP user in the CentOS
user_config_dir=/etc/vsftpd/vuser_conf//Set up virtual user's personal vsftp CentOS
FTP Service file Store path. CentOS FTP service file with Virtual user personality (Profile name = Virtual user name)
2. Create user password file/etc/vsftpd/vuser_passwd.txt, note that the odd line is the user name, even the password
VI Vuser_passwd.txt
Admin
passwd
3. Generate a virtual user Certified DB file
Db_load-t-T Hash-f/etc/vsftpd/vuser_passwd.txt
/etc/vsftpd/vuser_passwd.db
LS to see if vuser.passwd.db generated
4. Edit the authentication document/ETC/PAM.D/VSFTPD
Remove the previous comment and add the following
Note: The vuser_passwd in DB=/ETC/VSFTPD/VUSER_PASSWD is the db file of the virtual user you generated
View System version number: Getconf long_bit
The system is 32-bit:
Auth Required pam_userdb.so db=/etc/vsftpd/vuser_passwd account
Required Pam_userdb.so DB=/ETC/VSFTPD/VUSER_PASSWD
The system is 64-bit:
Auth required/lib64/security/pam_userdb.so
DB=/ETC/VSFTPD/VUSER_PASSWD account Required
/lib64/security/pam_userdb.so db=/etc/vsftpd/vuser_passwd
5. Create a virtual user profile
mkdir/etc/vsftpd/vuser_conf/
Vi/etc/vsftpd/vuser_conf/admin
The filename is equal to the account name inside the Vuser_passwd.txt, otherwise the following settings are invalid
6. Set User profile content
LOCAL_ROOT=/STORAGE/FTP//Virtual user root directory, modify the directory according to the actual situation must have read and write permission
Write_enable=yes//Writable
anon_umask=022//Mask
Anon_world_readable_only=no
Anon_upload_enable=yes
Anon_mkdir_write_enable=yes
Anon_other_write_enable=yes
7. Set folder permissions
Chmod-r 777/storage
8. Set SELinux
Setsebool-p ftp_home_dir=1//Set FTP can use the home directory
Setsebool-p Allow_ftpd_full_access=1//Set FTP user can have all permissions
9. Start VSFTPD Service
Service vsftpd start using FileZilla connection
Use the Quick Connect feature. Fill in the host number, just set up a good account password admin/passwd