Yum-y Install vsftpd*
Yum-y Install db4*
============================================================================
Create a text file that contains the virtual user name and its password, and then build the virtual User Password library file on this basis:
#vim Logins.txt
Add the following information (singular behavior username, even action password):
123//user name
456//Password
: Wq//Save and exit
==================================================================================
Db_load-t-T Hash-f logins.txt/etc/vsftpd_login.db
chmod 600/etc/vsftpd_login.db
=============================================================================
Vi/etc/pam.d/ftp.vu
Auth required/lib/security/pam_userdb.so Db=/etc/vsftpd_login
Account Required/lib/security/pam_userdb.so Db=/etc/vsftpd_login
==============================================================================
Establish virtual user access to directory and set access permissions for VPN users
#useradd-D/var/ftp/share-s/sbin/nologin virtual
#chmod 700/var/ftp/share
=====================================================================================================
Vim/etc/vsftpd/vsftpd.conf is added at the bottom
Chroot_local_user=yes
Guest_enable=yes
Guest_username=virtual
Pam_service_name=ftp.vu
User_config_dir=/etc/vsftpd_user_conf
==================================================================================================
Establishes User_config_dir file directory and create a configuration file named after the user name
#mkdir/etc/vsftpd/user_config_dir
#vi/ETC/VSFTPD/USER_CONFIG_DIR/1
anon_world_readable_only=no Browse Permissions
Anon_ upload_enable=yes #?
write_enable=yes # Upload Permission
Download_enable=yes # Download rights
Anon_other_write_enable=yes # Delete Permission
Anon_mkdir_write_enable=yes # Establish folder permissions
local_root=/var/ftp/share/123 # Specify the default path for user login
Other account configuration depends on the above parameters and set according to the requirements.
===============================================================
Vim/etc/vsftpd_user_conf/123
Anon_world_readable_only=no
Anon_upload_enable=yes
Write_enable=yes
Download_enable=yes
Anon_other_write_enable=yes
Anon_mkdir_write_enable=yes
Local_root=/var/ftp/share/123
Mkdir-p/var/ftp/share/123
================================================
Whenever you create a virtual user
1 Modify Vim Logins.txt add users and Passwords
2 in the Build database
Db_load-t-T Hash-f logins.txt/etc/vsftpd_login.db
chmod 600/etc/vsftpd_login.db
3 set different permissions for each virtual user name
Cp-p/etc/vsftpd_user_conf/123/etc/vsftpd_user_conf/789
4 Set permissions for vim/etc/vsftpd_user_conf/789 users
Anon_world_readable_only=no
Anon_upload_enable=yes
Write_enable=yes
Download_enable=yes
Anon_other_write_enable=yes
Anon_mkdir_write_enable=yes
local_root=/var/ftp/share/789
=======================================================
Mkdir-p/var/ftp/share/789
Chown-r Virtual.virtual/var/ftp/share