1. install vsftp and db4sudo apt-get install vsftpdsudo apt-get install db4.6-util 2. Create The sudo mkdir/etc/vsftpdfile named logins.txt, sudo gedit/etc/vsftpd/logins.txt: username with odd behavior. The password is an even-numbered password. The password of User1 is 123456 and User2 is 12345user4153456user212345adminadmin. 3. Generate a vsftpd authentication file and use the db_load command to generate the authentication file: db4.6 _ load-T-t hash-f/etc/vsftpd/logins.txt/etc/vsftpd/vsftpd_login.db set the vsftpd_login.db permission to read and write only to the root user, that is, 600 chmod 600/etc/vsftpd/vsftpd_login.db 4. Create the PAM Configuration File required by the virtual user in/etc/pam. create vsftpd in the d directory. vu content is as follows: sudo gedit/etc/pam. d/vsftpd. vuauth required/lib/security/pam_userdb.so db =/etc/vsftpd/vsftpd_loginaccount required/lib/security/pam_userdb.so db =/etc/vsftpd/vsftpd_login 5. Create system users required by virtual users and the main directory sudo useradd jtmvi-d/www-s/bin/falsesudo chown jtmvi. jtmvi/wwwsudo chown jtmvi. jtmvi/www/User1sudo chown jtmvi. jtmvi/www/User2sudo chmod 700/www 6. Set vsftpd. conf configuration file: (back up first) sudo cp/etc/vsftpd. conf/etc/vsftpd. conf_old # Back up gedit/etc/vsftpd. conflisten = YESanonymous_enable = NOdirmessage_enable = YESxferlog_enable = YESxferlog_file =/var/log/vsftpd. logxferlog_std_format = YESchroot_local_user = YESguest_enable = YESguest_username = jtmviuser_config_dir =/etc/vsftpd_user_confpam_service_name = vsftpd. vulocal_enable = YES 7. set different permissions for different virtual users. sudo mkdir/etc/users/etc/vsftpd_user_conf/User1write_enable = users = NOanon_upload_enable = users = YESlocal_root =/www/User1 gedit/etc/vsftpd_user_conf/User2write_enable = Enabled = YESlocal_root =/www/User2gedit/etc/logs/adminwrite_enable = Enabled = YESlocal_root =/ www 8. Restart vsftpd/etc/init. d/vsftpd restart author But_Bueatiful