# / Etc / vsftpd
vsftpd vsftpd.ftpusers vsftpd.user_list // 3 default configuration files //vsftpd.conf default configuration # Grep -v "#" vsftpd.conf
Anonymous_enable = yes
Local_enable = YES
Write_enable = YES
Local_umask = 022
DirMessage_enable = YES
Xferlog_enable = YES
Connect_From_Port_20 = YES
Xferlog_std_format = yes
PAM_SERVICE_NAME = VSFTPD
UserList_enable = YES
Listen = yes
TCP_WrapPERS = YES
1. Modify the default vsftpd configuration
1. Allow anonymous users to upload // Open the following two anon_upload_enable = yes
#
Anon_mkdir_write_enable = yes
2. Add the following configuration statement anon_world_readable_only = no // Used to open anonymous user browsing permissions
// Create an anonymous upload directory and modify the permissions # MKDIR / VAR / FTP / INCOMING # chmod o w / var / ftp / incoming /
3, add an anonymous user's rewriting and other operations Anon_other_write_enable = yes // open all write permissions. Contains file reame numbers, delete files, etc.
2, set Chroot
/ / Cannot switch to the directory other than your own directory after logging in (1) Set all local users to perform Chroot
chroot_local_user = yes
(2) Set the specified user to execute Chroot
Chroot_local_user = no chroot_list_enable = yes chroot_list-file = / etc / vsftpd.chroot_list
// Only the user specified in the file does Chroot
Configuring access control based on local users
(1) The user specified in /etc/vsftpd.user_list cannot access the FTP server, other local users can access userlist_enable = yes
UserList_deny = YES
UserList_file = / etc / vsftpd.user_list
(2) / etc / vsftpd.user_list can access the FTP server, other local users cannot access UserList_Nable = YES
UserList_Deny = NO
UserList_file = / etc / vsftpd.user_list
For userlist_enable, you can understand this:
If UserList_enable = YES, the VSFTPD will load a list of files that contain the username from the file name given from the userlist_file option. Then read the value of UserList_deny to determine if the user in vsftpd.user_list can access the FTP server.