A. Installation Preparation
1. Close SELINUX
setenforce 0
II. Installation vsftpd service
1. First enter the / usr / local / src inside
yum -y install vsftpd
2. Backup vsftpd master configuration file
cp /etc/vsftpd/vsftpd.conf{,.bak}
III. Configuring vsftpd virtual users accessing the service
1.vi /etc/vsftpd/vir_user
2. generate virtual users database:
yum -y install libdb-utils
db_load -T -t hash -f /etc/vsftpd/vir_user /etc/vsftpd/vir_user.db
chmod 700 /etc/vsftpd/vir_user.db
IV. Configuring vsftpd pam verification file
1. Modify the foregoing backup file
cp /etc/pam.d/vsftpd{,.bak}
2. The auth configuration line account and all are commented out, add the following two lines
we /etc/pam.d/vsftpd
Read and write to the file system after V. add a system user 'virftp', all virtual users will be mapped to this user
mkdir /ftproot
useradd -d /ftproot -s /sbin/nologin virftp
chown -R virftp:virftp /ftproot
VI. Set vsftpd master configuration file
vi /etc/vsftpd/vsftpd.conf (not then add)
VII. Configure each virtual user profiles
1. Create a 'virtual user profile' storage directory
mkdir /etc/vsftpd/vsftpd_viruser/
2. Create and configure each virtual user configuration file, the file name is 'virtual user name'
vi / etc / vsftpd / vsftpd_viruser / long
mkdir -p /ftproot/admin/
chown -R virftp.virftp /ftproot/admin/
VIII. Test Configuration
1 . Restart vsftpd service
systemctl restart vsftpd
systemctl enable vsftpd
2. Turn off the firewall
systemctl stop firewalld
IX. Open My Computer
1. Enter ftp: // IP address
Then there will be a login interface (enter your own password and create virtual user)
Go after the right-click New Folder
If you can not create a new folder, then enter
setsebool -P allow_ftpd_full_access on and
setsebool -P ftp_home_dir on
Then restart vsftpd
systemctl restart vsftpd
After losers again New Folder
2. enter cmd inside on Windows
Enter the ftp IP address
3. The use of 'FlashFXP' connection test tool
The host should be written as ftP: // IP address (port 21)
4. In Gordon root (port 22)
If the login is successful
Then enter cd / etc / vsftpd
ls View
vi ftpusers (all of the contents inside Zhushidiao)
Then again login, the login is not successful then the correct