Virtual users of vsftp and virtual users of vsftp

Source: Internet
Author: User

Virtual users of vsftp and virtual users of vsftp

 

1. installation:

Yum install-y vsftpd

Yum install-y lftp
2. Create a user
Useradd virftp-s/sbin/nologin
3. Create a virtual user and its storage path
Vim/etc/vsftpd/vsftpd_login


Chmod 600/etc/vsftpd/vsftpd_login
4. Generate recognizable library files
Db_load-T-t hash-f/etc/vsftpd/vsftpd_login/etc/vsftpd/vsftpd_login.db
5. Create a virtual account
Mkdir/etc/vsftpd/vsftpd_user_conf
Cd/etc/vsftpd/vsftpd_user_conf
Vim test1
[Root @ test2 vsftpd_user_conf] # vim test1
Local_root =/home/virftp/test1
Anonymous_enable = NO
Write_enable = YES
Local_umask = 022
Anon_upload_enable = NO
Anon_mkdir_write_enable = NO
Idle_session_timeout = 600
Data _ connection_timeout = 120
Max_clients = 10
Max_per_ip = 5
Local_max_rate = 50000
6. Create a Home Directory
Mkdir/home/virftp/test1
Chown-R virftp: virftp/home/virftp/test1
7. Edit the authentication File
Vim/etc/pam. d/vsftpd
Auth sufficient/lib64/security/pam_userdb.so db =/etc/vsftpd/vsftpd_login
Account sufficient/lib64/security/pam_userdb.so db =/etc/vsftpd/vsftpd_login

Ls/lib64/security/pam_userdb.so
Note: If the host is 64-bit, it is/lib64. Otherwise, it is/lib.
8. Edit the vsftp configuration file
Vim/etc/vsftpd. conf



Guest_enable = YES
Guest_username = virftp
Virtual_use_local_privs = YES
User_config_dir =/etc/vsftpd/vsftpd_user_conf
9. Restart and execute
/Etc/init. d/vsftpd restart
Cd/home/virftp/test1/
Touch 2.txt
Mkdir123
Lftptest1@127.0.0.1



 

 

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.