So I upgraded my Ubuntu Server to 12.04 LTS today and now VSFTPD wont work. I think it is related to this VSFTPd stopped working after update

However, unlike the asker in that post, I am not getting any error messages. When I log on, I get

220 (vsFTPd 2.3.5)
331 Please specify the password.
530 Login incorrect.
ftp: Login failed

I know the password is correct,and I have tried multiple users. vsftpd.log shows nothing other than:

Tue May  1 15:19:48 2012 [pid 2] CONNECT: Client ""
Tue May  1 15:19:53 2012 [pid 1] [USERNAME] FAIL LOGIN: Client ""

Syslog shows nothing. Here is my VSFTPD.conf (mostly default):


I tried the command mentioned in the previous question to no avail.

sudo chmod a-w /home/user

Thanks, I appreciate all your help!

5 Answers 5


In vsftpd.conf

Make the following change : pam_service_name=ftp

Save your change and restart the ftp server.

  • Thanks very much! You wouldn't believe how much of a pain this has been! Dec 10, 2012 at 14:00
  • 5
    Care to elaborate on your solution?
    – frhd
    Mar 27, 2015 at 9:58
  • Where can I find vsftpd.conf.. Aug 20, 2015 at 19:26
  • This fixed my problem! WTF. Why is this not the default service name, uhh? What is a PAM service? Jun 27, 2016 at 20:57
  • this ends up giving me: 500 OOPS: priv_sock_get_result Login failed. 421 Service not available, remote server has closed connection
    – Ascherer
    Aug 7, 2016 at 10:54

There are several Reason why you may get this reason.

Firewall-->>Tcp_wrapper-->>PAM-->>SElinux-->>FTPService-->> File.

  1. First Check if the given user is blocked or not in /etc/vsftpd/ftpusers /etc/vsftpd/user_list

  2. Check SElinux Context or Boolean for the Same.

  3. Check in PAM directory file. /etc/pam.d/vsftpd

auth required pam_shells.so

if user is not having required shell like in /etc/shells then it will give same error check getent passwd username match given shell with /etc/shells.


Try to first login to the FTP through firefox or a browser, so you are sure to get a response why you are not able to log in.

This is just as a precausion to confirm if it is the login credentials itself or not.


It seems that current pam configuration for vsftp includes a requirement to have a valid shell something you want to avoid in case of an FTP user.

# Standard behaviour for ftpd(8).
auth    required    pam_listfile.so item=user sense=deny file=/etc/ftpusers onerr=succeed

# Note: vsftpd handles anonymous logins on its own. Do not enable pam_ftp.so.

# Standard pam includes
@include common-account
@include common-session
@include common-auth
auth    required    pam_shells.so

The only thing you have to do is to comment last line auth required pam_shells.so. So this is no required.

Or add a login to all your ftp users.

Changing the name as suggested in the other comment is no point as you loose the deny file.


If running an amd64 kernel, you will need to add the following to your /etc/vsftpd/vsftpd.conf


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .