centos 7 installation using virtual vsftpd

A. Installation Preparation

1. Close SELINUX

setenforce 0

II. Installation vsftpd service

1. First enter the / usr / local / src inside

yum -y install vsftpd
centos 7 installation using virtual 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
centos 7 installation using virtual vsftpd

2. generate virtual users database:

yum -y install libdb-utils
centos 7 installation using virtual vsftpd
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
centos 7 installation using virtual 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)
centos 7 installation using virtual vsftpd
centos 7 installation using virtual vsftpd

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
centos 7 installation using virtual vsftpd

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
centos 7 installation using virtual vsftpd

Then there will be a login interface (enter your own password and create virtual user)
centos 7 installation using virtual vsftpd

Go after the right-click New Folder

centos 7 installation using virtual vsftpd

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
centos 7 installation using virtual vsftpd

3. The use of 'FlashFXP' connection test tool

The host should be written as ftP: // IP address (port 21)
centos 7 installation using virtual vsftpd

centos 7 installation using virtual vsftpd
4. In Gordon root (port 22)

centos 7 installation using virtual vsftpd

If the login is successful

Then enter cd / etc / vsftpd

ls View

vi ftpusers (all of the contents inside Zhushidiao)
centos 7 installation using virtual vsftpd

Then again login, the login is not successful then the correct
centos 7 installation using virtual vsftpd

Guess you like

Origin blog.51cto.com/14259161/2426838