Sudoapt-getinstallvsftpd configuration # Create a user ftpuser and add it to the ftpuser group, at the same time, set the home directory of ftpuser to the ftp directory # so that ftpuser login will be restricted to sudovim/etc/vsftpd in the ftp directory. conflistenYESanony... sudo apt-get install vsftpd
Configuration
# Create a user ftpuser and add it to the ftpuser group. at the same time, set the home directory of the ftpuser to the ftp directory.
# In this way, ftpuser login will be restricted to the ftp directory.
Sudo vim/etc/vsftpd. conf
Listen = YES
Anonymous_enable = NO
Local_enable = YES
Write_enable = YES
Local_umask = 022
Anon_upload_enable = NO
Anno_mkdir_write_enable = NO
Use_localtime = YES
Xferlog_enable = YES
Connect_from_port_20 = YES
Chown_uploads = YES
Chown_username = ftpuser # Your ftp user name
Xferlog_file =/var/log/vsftpd. log
Chroot_list_enable = YES
Chroot_list_file =/etc/vsftpd. chroot_list # User ftpuser to be restricted
Secure_chroot_dir =/var/run/vsftpd/empty
Pam_service_name = vsftpd
Rsa_cert_file =/etc/ssl/private/vsftpd. pem
Start and stop
Service vsftpd start/stop/restart
(Note: If/etc/vsftpd. chroot_list does not exist, you need to create this file and add your users to this file with one user name per line)
In this way, only this user can log on to ftp, and other users such as root cannot log on. if you want these users to log on to ftp, you can change the password on the Internet.
Pam_service_name, full path, vsftpd. pam, false check_shell = NO
None of this works. local users cannot access master tricks ??!!!
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.