Vsftpd User Configuration

Source: Internet
Author: User

1. Use Local Users

1. Edit the/etc/vsftpd. conf file to allow local users to log on to FTP and set

Local_enable = Yes

2. the/etc/ftpusers file will allow local users to delete FTP logon. (Users in this file are not allowed to log on by default.) For example, to allow a root user to log on, comment out the root user:

# Root

3. Set the default directory when you log on to FTP, such as/home/VMS/SDR/work. Edit the/etc/vsftpd. conf file and add the following information:

Local_root =/home/VMS/SDR/work

4. Set vsftpd, boundary/etc/vsftpd. conf in standalone mode, and set

Listen = Yes

5. Restart vsftpd.

Service vsftpd restart

6,/etc/vsftpd. conf file parameters can be referred to: http://www.suse.url.tw/sles10/lesson18.htm#4

Ii. Using Virtual users

1. Write a text file and enter the user name and password. You can add multiple virtual users at the same time. The rule is that the user name and password each occupies one line.

VI login.txt

Content:

Usera

Passworda

2. Generate the user's database verification information, provided that the system has installed the db_load command

Db_load-T-t hash-F/etc/vsftpd/login.txt/etc/vsftpd/vsftpd_login.db

This command will generate the vsftpd_login.db file in the/etc/vsftpd directory

3. Change vsftpd_login.db Permissions

Chmod 600/etc/vsftpd/vsftpd_login.db

4. Edit the/etc/PAM. d/vsftpd file.

VI/etc/PAM. d/vsftpd

And add the following content:

Auth required/lib/security/pam_userdb.so Lib =/etc/vsftpd/vsftpd_login

Account required/lib/security/pam_userdb.so Lib =/etc/vsftpd/vsftpd_login

Note that for 64 bitos, change lib to lib64.

5. Add a user, such as adding a User Virtual

Useradd virtual

6. Configure/etc/vsftpd. conf to ensure the following information is available:

Local_enable = Yes

Pam_service_name = vsftpd

Guest_enable = Yes

Guest_username = Virtual

User_config_dir =/etc/vsftpd/vuser

This configuration description enables virtual users and maps them to virtual users. For each virtual user, the configuration information is stored in the/etc/vsftpd/vuser Directory, which can be customized.

7. Add the configuration information for the virtual user and place it in the/etc/vsftpd/vuser directory. The file name must be the same as the virtual user name. Here:

VI/etc/vsfptd/vuser/usera

Add configuration information (this information can be customized as needed. For details, refer to/etc/vsftpd. conf configuration ):

Anno_world_readable_only = No

Write_enable = Yes

Anon_upload_enable = Yes

Local_root =/home/usera/.. # specify the Default User Logon directory

8. Restart vsftpd in standalone Mode

Service vsftpd restart

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.