4

I have a vsftp server with this configuration running in ubuntu 22.04:

listen=YES
listen_ipv6=NO
anonymous_enable=NO
local_enable=YES
write_enable=YES
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=NO
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
rsa_cert_file=/etc/<hidden>
rsa_private_key_file=/etc/<hidden>
ssl_enable=YES
allow_anon_ssl=NO
force_local_data_ssl=YES
force_local_logins_ssl=YES
ssl_tlsv1=YES
ssl_sslv2=NO
ssl_sslv3=NO
require_ssl_reuse=NO
ssl_ciphers=HIGH
pasv_min_port=60000
pasv_max_port=60002
userlist_enable=YES
userlist_file=/etc/vsftpd.userlist
userlist_deny=NO

I expected the vsftp server to allow access only to users in /etc/vsftpd.userlist but it allows access to any local user.

I tried local_enable=NO. It didn't have any effect.

/etc/vsftpd.userlistcontains only two users.

Any idea?

1 Answers1

1

The default file is /etc/vsftpd.user_list (notice the underscore), while you specified /etc/vsftpd.userlist (without underscore).

Please restore the default location by removing the line with userlist_file=/etc/vsftpd.userlist and be sure your user list file under /etc to be named vsftpd.user_list (with the underscore).

Then restart the vsftpd service.

shodanshok
  • 52,255