Linux CentOS6.2 x64 vsftpd configuration vsftpd virtual user Server recently configured a simple vsftpd Server due to project requirements, combined with online information, sorted out the configuration steps for future reference: www.2cto.com 1. components required to install vsftpd [root @ localhost ~] # Yum-y install pam * [root @ localhost ~] # Yum-y install db4 * [root @ localhost ~] # Yum-y install vsftpd * 2. Create a virtual user [root @ localhost ~] # Vi/etc/vsftpd/vftpusers.txt add virtual user name and password, odd behavior user name, even behavior password ftpusers 123456 Ftpusers1 123456 www.2cto.com 3. Generate virtual user password authentication file [root @ localhost ~] # Db_load-T-t hash-f/etc/vsftpd/vftpusers.txt/etc/vsftpd/vftpusers. db 4. Edit the PAM Authentication For vsftpd [root @ localhost ~] # Vi/etc/pam. d/vsftpd annotate all the original content and add the following two lines at the end (Change lib64 to lib in a 32-bit system ): auth required/lib64/security/pam_userdb.so db =/etc/vsftpd/vftpusersaccount required/lib64/security/pam_userdb.so db =/etc/vsftpd/vftpusers 5. Create local ing users and set hosts permission [root @ localhost ~] # Useradd-d/app/syncdata-s/sbin/nologin vftpusers [root @ localhost ~] # Chmod 776/app/syncdata 6. Configure vsftpd. conf (set virtual user configuration items) to upload, download, delete, and create directories [root @ localhost ~] # Vi/etc/vsftpd. confanonymous_enable = NOlocal_enable = YESwrite_enable = YESlocal_umask = 022anon_umask = Signature = YESxferlog_enable = YESconnect_from_port_20 = NO # pasv mode, set port mode to YESlisten_port = 2121pasv_min_port = 65000pasv_max_port = 65100chown_uploads = NOxferlog_std_format = YESnopriv_user = vftpusersasync_abor_enable = YESas Users = users = YESchroot_local_user = users = NOlisten = YES guest_enable = YESguest_username = vftpusers # users = YES hide_file =. * 7. Disable selinux [root @ localhost ~] # Vi/etc/selinux/config change SELINUX = enforcing to SELINUX = disabled restart Server 8. Test logon [root @ localhost ~] # Service vsftpd restart vsftpd and test logon. 9. Create a configuration file for each virtual user [root @ localhost ~] # Mkdir/etc/vsftpd/vftpusers_conf edit the ftpusers file [root @ localhost ~] # Vi/etc/vsftpd/vsftpd_user_conf/ftpusers add anon_other_write_enable = YES # enable the permission to delete ftpusers. To add the option [root @ localhost ~] to the configuration file of vsftpd, create a configuration file with the same name and write the required configuration file. # Vi/etc/vsftpd. add the following line to the conf: user_config_dir =/etc/vsftpd/vsftpd_user_conf # Set the user configuration file storage directory www.2cto.com 10. Virtual user advanced settings 1. virtual_use_local_privs parameter when virtual_use_local_privs =, virtual users and local users have the same permissions. When virtual_use_local_privs = NO, virtual users and anonymous users have the same permissions. The default value is NO. When virtual_use_local_privs = YES, write_enable = YES, the virtual user has the write permission (upload, download, delete, rename) When virtual_use_local_privs = NO, write_enable = YES, success = YES anon_upload_enable = YES, A virtual user cannot browse directories, but can only upload files without other permissions. When virtual_use_local_privs = NO, write_enable = YES, anon_world_readable_only = NO anon_upload_enable = NO, the virtual user can only download files. If virtual_use_local_privs = NO, write_enable = YES, when anon_world_readable_only = NO anon_upload_enable = YES, the virtual user can only upload and download files. If virtual_use_local_privs = NO, write_enable = YES, anon_world_readable_only = NO permission = YES, A virtual user can only download files and create folders. If virtual_use_local_privs = NO, write_enable = YES, anon_world_readable_only = NO anon_other_write_enable = YES, the virtual user can only download, delete, and rename files, no other Permissions