VSFTP Virtual User configuration method 1. create a virtual user password library file to set the username for odd number lines, and set the password for even number lines # vi/etc/vsftpd/logins.txt www.2cto. commikepwabcdjohnpw12342. Generate the vsftpd authentication file # db_load...
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)
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.