After centos is installed with vsftp, the virtual user is configured with vsftpd. when a virtual user is configured, You can first write a login.txt, an odd number of behavior usernames, and an even number of usernames and passwords. For example: user1 password1 user2 password2 then generates the file db_load-T-hash-f login.txt/etc/vsftpd/vsftpd_login.db. Modify the File Permission chmod 600] of vsftpd_login.db to create a new virtual user PAM File. Add the following two lines of content vim/etc/pam. d/vsftp. vn auth required/lib64/security/pam_userdb.so db =/etc/vsftpd/vsftpd_login account required/lib64/security/pam_userdb.so db =/etc/vsftpd/login now adds a virtual user useradd vftp; then in/etc/vsftpd/vstfpd. set guest_enable = YES guest_username = vftp user_config_dir =/etc/vsftpd/vsftpd_user_config pam_service_name = vsftp. vu then restart vsftpd service vstpd restart. If you want to set virtual user permissions, you can create a file with the same virtual user name in the/etc/vsftpd/vsftpd_user_config directory, for example, the virtual user user1 vim/etc/vsftpd/vsftpd_user_config/user1 sets the virtual directory local_root =/home/vftp/user1