First, you need to have vsftpd service
Yum can download go in (of course you need to have a local yum repository)
Enter the command: yum install vsftpd
After the download is complete open the vsftpd service
Enter the command: systemctl start vsftpd
Well, to start operation
Let's explain the virtual user configuration (us know what virtual users, why do we need to use virtual users, because more secure)
First download service
Vsftpd switch to the program directory, then modify this file will be written into the user name and password
Enter the command: cd / etc / vsftpd
Create a generation FTP original user account and password file database (say go empty, we are here to create a virtual user)
I am here to set up three virtual users as an example ( singular behavior accounts, double the number of acts password )
Use command HASH generation algorithm FTP user database files
View database file type (database file can be found)
Change FTP user database content rights
Delete the original account and password file
Create a user virtual and set to not allow landing system and define the user's home directory
Let's see under the user's home directory permissions
amount. . . Permissions little less, we look to improve
To ensure that other users can access, giving rwxr-xr-x permissions
Then build support for virtual users PAM authentication file:
Enter the command: vim /etc/pam.d/vsftpd.vu
// parameter db used to point to just generated vuser.db file, but do not write the suffix.
auth required pam_userdb.so db=/etc/vsftpd/vuser
account required pam_userdb.so db=/etc/vsftpd/vuser
As to the use of virtual user mode, and user mode virtual indeed more secure than anonymous access mode, configure also turn off anonymous open mode.
Now what we have to assign different permissions for the virtual users
If you want users to be able to fully manage FTP information in, we need to make FTP program supports independent user permissions configuration files
Let's look at the configuration file (file no words to add, modify some words)
Enter the command: vim /etc/vsftpd/vsftpd.conf
Create a separate directory user rights profiles stored:
Enter the command: mkdir / etc / vsftpd / vusers_dir /
Switching into the directory:
Enter the command: cd / etc / vsftpd / vusers_dir /
Create a blank linuxuser1 profile:
Enter the command: Touch linuxuser1
Designated linuxuser1 user specific permissions:
Enter the command: vi linuxuser1
anon_upload_enable=YES
anon_mkdir_write_enable=YES
anon_other_write_enable=YES
Next we restart the service