In the former aricle the ftp server was made, with pam authentication. This means that any valid user on your linuxbox can log in with it’s username and password.

If you want to limit the users that would be able to login to the ftp service to a list, paste the following at the end of vsftpd.conf file:

userlist_deny=NO
userlist_enable=YES
userlist_file=/etc/vsftpd/vsftpd.user_list

Now edit/create the /etc/vsftpd/vsftpd.user_list and insert the list of users line by line that you want to allow loging in to the ftp server. If you change the userlist_deny to YES, this list will represent the oposite – a list of users that are denied to login.

Try to restart the FTP service (service vsftpd restart) and if everything is allright, you’re good to go. You’ll have to restart or reload the FTP service every time you change the vsftpd.user_list and want to make it valid.

 Vsftpd user list not working

You probably (and normally) created the vsftpd.user_list file with root privileges. Remember that the file has to be readable for the vftpd user. We determined that the vsFTPd (nopriv) user will be called ftpsecure (take a look at the first article).

So, you’ll either do a chmod 644 /etc/vsftpd/vsftpd.user_list or chown ftpsecure:ftpsecure /etc/vsftpd/vsftpd.user_list

Restart the vsftpd service after this.

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.