vsftpd: allow access only for certain users
I want to setup FTP server to allow only certain users, so with vsftpd, I add in vsftpd.conf
:
local_enable=YES
user_config_dir=/etc/vsftpd_user_conf
In /etc/vsftpd_user_conf
for the unix user foo
I set in a file foo:
local_root=/home/foo/ftpdir
anon_world_readable_only=NO
write_enable=YES
anon_upload_enable=YES
anon_mkdir_write_enable=YES
anon_other_write_enable=YES
virtual_use_local_privs=YES
local_umask=022
... and I launch vsftpd. I can login to FTP with user foo. However, I also can with other unix users! How can I disable other unix users?
Solution 1:
In vsftpd.conf add:
userlist_enable=YES
userlist_file=/etc/vsftpd.userlist
userlist_deny=NO
Edit the file to contain a username per row.
Solution 2:
there is a file in /etc/ftpusers put the allowed one only here.
no need to define in vsftpd