VSFTPD Virtual User Configuration steps _ftp server

Source: Internet
Author: User
Tags chmod mkdir

Yum-y Install vsftpd*
Yum-y Install db4*
============================================================================
Create a text file that contains the virtual user name and its password, and then build the virtual User Password library file on this basis:
#vim Logins.txt

Add the following information (singular behavior username, even action password):
123//user name
456//Password

: Wq//Save and exit
==================================================================================
Db_load-t-T Hash-f logins.txt/etc/vsftpd_login.db
chmod 600/etc/vsftpd_login.db

=============================================================================
Vi/etc/pam.d/ftp.vu

Auth required/lib/security/pam_userdb.so Db=/etc/vsftpd_login
Account Required/lib/security/pam_userdb.so Db=/etc/vsftpd_login

==============================================================================

Establish virtual user access to directory and set access permissions for VPN users
#useradd-D/var/ftp/share-s/sbin/nologin virtual
#chmod 700/var/ftp/share
=====================================================================================================
Vim/etc/vsftpd/vsftpd.conf is added at the bottom


Chroot_local_user=yes
Guest_enable=yes
Guest_username=virtual
Pam_service_name=ftp.vu
User_config_dir=/etc/vsftpd_user_conf

==================================================================================================
Establishes User_config_dir file directory and create a configuration file named after the user name
#mkdir/etc/vsftpd/user_config_dir
#vi/ETC/VSFTPD/USER_CONFIG_DIR/1
anon_world_readable_only=no                               Browse Permissions
Anon_ upload_enable=yes                                     #?
write_enable=yes                     # Upload Permission

Download_enable=yes # Download rights
Anon_other_write_enable=yes # Delete Permission
Anon_mkdir_write_enable=yes # Establish folder permissions
local_root=/var/ftp/share/123 # Specify the default path for user login

Other account configuration depends on the above parameters and set according to the requirements.

===============================================================
Vim/etc/vsftpd_user_conf/123


Anon_world_readable_only=no
Anon_upload_enable=yes
Write_enable=yes
Download_enable=yes
Anon_other_write_enable=yes
Anon_mkdir_write_enable=yes
Local_root=/var/ftp/share/123


Mkdir-p/var/ftp/share/123
================================================
Whenever you create a virtual user

1 Modify Vim Logins.txt add users and Passwords

2 in the Build database
Db_load-t-T Hash-f logins.txt/etc/vsftpd_login.db
chmod 600/etc/vsftpd_login.db


3 set different permissions for each virtual user name
Cp-p/etc/vsftpd_user_conf/123/etc/vsftpd_user_conf/789
4 Set permissions for vim/etc/vsftpd_user_conf/789 users


Anon_world_readable_only=no
Anon_upload_enable=yes
Write_enable=yes
Download_enable=yes
Anon_other_write_enable=yes
Anon_mkdir_write_enable=yes
local_root=/var/ftp/share/789

=======================================================

Mkdir-p/var/ftp/share/789

Chown-r Virtual.virtual/var/ftp/share

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.