VSFTP virtual user configuration method

Source: Internet
Author: User


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)

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.