Vsftp virtual user settings in linux-Linux Enterprise Application-Linux server application information. For details, refer to the following section. I used rpm for packaging on as4. The installation steps are not easy!
1. Create a virtual account and User Password File
C. Create the PAM Configuration File required by the virtual user.
Create a vsftpd. vu file manually
* *** Important *** uth required/lib/security/pam_userdb.so db =/etc/vsftpd/vsftpd_login
* ** Important ** account required/lib/security/pam_userdb.so db =/etc/vsftpd/vsftpd_login
Create a system user account used by all FTP virtual user accounts, and set the permissions for the root directory of the account.
# Useradd-d/home/ftpsite virtual
# Chmod 700/home/ftpsite
F. Set the vsftpd. conf configuration file.
Add the virtual user configuration content to the configuration file.
Guest_enable = YES
Guest_username = virtual
Pam_service_name = vsftpd. vu
Restart the vsftpd service program.
Set different permissions for virtual users
Set the main configuration file.
Add the user configuration file directory settings in the vsftpd. conf file.
User_config_dir =/etc/vsftpd_user_conf
Create a user configuration file directory.
Run the mkdir command to create a directory for the user configuration file.
# Mkdir/etc/vsftpd_user_conf
Create a separate configuration file for the virtual user.
The user configuration file name is the same as the user name.
/Etc/vsftpd_user_conf/mike
/Etc/vsftpd_user_conf/john
The content is as follows:
Anon_world_readable_only = NO indicates that you can browse the FTP directory and download files.
Anon_upload_enable = YES indicates that you can upload files.
Anon_mkdir_write_enable = YES indicates that the user has the permission to create and delete directories.
Anon_other_write_enable = YES indicates that the user has the permission to rename and delete files.
No configuration items are configured according to vsftpd. conf by default.
# When virtual_use_local_privs is set to YES, the virtual user has the same permissions as the local user. If it is set to NO, the virtual user has the same permissions as the anonymous user.
Virtual_use_local_privs = YES
# Pam Authentication file name
Pam_service_name = vsftpd
# Restrict local users to the Home Directory
Chroot_local_user = YES
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