I'm trying to get a vsftpd server set up on CentOS 5.3 x64. I'm not able to get any local user login's to work. Here is my vsftpd.conf:


Here is the output of vsftp.log:

Mon Sep 13 23:34:44 2010 [pid 19243] CONNECT: Client ""
Mon Sep 13 23:34:44 2010 [pid 19243] FTP response: Client "", "220 (vsFTPd 2.0.5)"
Mon Sep 13 23:34:44 2010 [pid 19243] FTP command: Client "", "USER dwelch"
Mon Sep 13 23:34:44 2010 [pid 19243] [dwelch] FTP response: Client "", "331 Please specify the password."
Mon Sep 13 23:34:44 2010 [pid 19243] [dwelch] FTP command: Client "", "PASS <password>"
Mon Sep 13 23:34:44 2010 [pid 19242] [dwelch] FAIL LOGIN: Client ""
Mon Sep 13 23:34:45 2010 [pid 19243] [dwelch] FTP response: Client "", "530 Login incorrect."

And the output of the secure log:

Sep 13 17:40:50 intra vsftpd: pam_unix(vsftpd:auth): authentication failure; logname= uid=0 euid=0 tty=ftp ruser=dwelch rhost=  user=dwelch

It looks like pam is not authenticating the user. Here is my /etc/pam.d/vsftp file:

session    optional     pam_keyinit.so    force revoke
auth       required     pam_listfile.so item=user sense=deny file=/etc/vsftpd/ftpusers onerr=succeed
auth       required     pam_shells.so
auth       include      system-auth
account    include      system-auth
session    include      system-auth
session    required     pam_loginuid.so

Can anyone see what I'm missing? Thanks.

  • I faced the same problem, I removed and installed vsftpd again and worked fine. Yes it is not good solution but it worked. – usef_ksa Jul 20 '11 at 11:51
  • Funny you're posting this ran into the exact same issue this week. Out of frustration I think we did reinstall vsftpd as well and it worked. Broken RPM? – Kyle Smith Jan 29 '12 at 3:13
 vi /etc/pam.d/vsftp  

comment #auth required pam_shells.so

and then

service vsftpd restart
pam_shells.so means that only users with shells access should be allowed so that's why needs to be commented.


In my case I resolved the same problem with the folowing:

vi /etc/pam.d/vsftpd

comment line #auth include system-auth


service vsftpd restart

  • 1
    The answer may be correct, but it would be more useful if you'd include some explanation for why this line should be commented out. – Jenny D Sep 22 '14 at 7:00

Does the user have a valid shell? I think it has to be in the /etc/shells list. Is the user definitely not the file /etc/vsftpd/ftpusers?

Make sure you definitely editing /etc/vsftpd/vsftpd.conf , that bit me on CentOS I was editing /etc/vsftpd.conf .

vsftpd can be a bit fiddly and is not great at reporting errors. Stick with it I was tearing my hair out at with a very similar problem, its always a simple solution.


This is not a proper answer, but a strategy that I found to serve me well:

Start commenting out lines in your /etc/pam.d/vsftp file, and see if (and when) it let you login. PAM is designed intentionally to report only success or failure, not reason.


do you only have one ftp server on your system? I had similar problems, and then low and behold I looked deeper into the issue and there were two ftp servers installed that were conflicting. I uninstalled one and the problem was fixed.

If you did the 'yum install vsftpd' you shouldn't have to mess with pam files (Somethings usually wrong when you start messing with PAM).

If that's not that run chkconfig --list | grep ftp and see what comes up ( see if vsftpd shows up there - if not something may be wrong with the install).

And my final suggestion would be to run a yum update.

  • vsftpd is an FTP server, not an SFTP server. They are different protocols. – hellomynameisjoel Nov 4 '10 at 6:14

vi /etc/passwd /bin/bash for your user


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.