VSFTP virtual user configuration method 1. Create a virtual user password library file and set the username in odd numbers in the password library file, password setting for even lines # vi/etc/vsftpd/logins.txt www.2cto.com mike pwabcd john pw1234 2. Generate vsftpd authentication file # db_load-T-t hash-f logins.txt/etc/vsftpd/logs note: if you do not have the db_load command, install the db4 * rpm package. Set the authentication file to be readable and writable only to the user # chmod 600/etc/vsftpd/vsftpd_login.db 3. Create the PAM Configuration File # vi/etc/pam required by the virtual user. d/vsftpd. vu auth required/lib/security/pam_userdb.so db =/etc/vsftpd/vsftpd_login account required/lib/security/pam_userdb.so db =/etc/vsftpd/vsftpd_login note: the last two file names in the above two rows are vsftpd_login and the database names in step 1 must be consistent! 4. Create a directory to be accessed by the virtual user and set the corresponding permissions # mkdir/home/ftpsite # useradd-d/home/ftpsite virtual (User Name) # chown virtual: virtual/home/ftpsite # chmod 700/home/ftpsite/5. Set vsftpd. conf configuration file guest_enable = YES guest_username = virtual pam_service_name = vsftpd. vu 6. Set the master configuration file in vsftpd. add the user configuration file directory in the conf file and set user_config_dir =/etc/vsftpd_user_conf # service vsftpd restart 7. Create the user configuration file directory and run the mkdir command to create the user configuration file directory # mkdir/etc/vsftpd_user _ create a separate configuration file for a virtual user, the user configuration file name is the same as the user name/etc/vsftpd_user_conf/mike/etc/vsftpd_user_conf/john 8. Each FTP virtual user can independently set its permissions anon_world_readable_only = NO readable and can download anon_upload _ you can upload anon_mkdir_write_enable = YES to create and delete the folder anon_other_write_enable = YES. You can rename and delete the file local_root =/home/ftpsite/mike to specify the host directory of mike (note: first create the mike folder under/home/ftpsite)