1

I install vsftpd on my ubuntu server, this follow is my vsftpd.conf file:

listen=YES
anonymous_enable=NO
local_enable=YES
check_shell=NO
write_enable=YES
local_umask=022
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=ftp
rsa_cert_file=/etc/ssl/private/vsftpd.pem

Then I try login the ftp server on my mac:

$ ftp 162.243.78.240
Connected to 162.243.78.240.
220 (vsFTPd 2.3.5)
Name (162.243.78.240:tangmonk): demo
331 Please specify the password.
Password:
530 Login incorrect.
ftp: Login failed

the demo user's password is absolutely correct, But I don't know why Login incorrect.

Moon soon
  • 111

3 Answers3

5
  1. Look at your /etc/passwd file
  2. Find your user and look shell (example ttr:x:501:501::/home/ukraine/ttr:/sbin/nologin)
  3. Add this shell (/bin/false or /sbin/nologin) to your /etc/shell or /etc/shells

After that, check your connection

Status: Retrieving directory listing... Command: PWD Response: 257 "/home/ukraine/ttr" Status: Directory listing successful

Sokol
  • 51
2

Don't worry, well' solve in a blink! :-)
Follow my steps:

  1. Edit your config file with the nano console text editor (or your preferred text editor) and add those lines:

    userlist_enable=YES

    local_enable=YES

  2. If you receive errors about PAM insert or edit:

    pam_service_name=vsftpd

  3. Edit /etc/vsftpd/ftpusers and remove your user.

  4. Edit /etc/vsftpd/user_list and remove your user.

Important note: protect your ftp account very well and disable the anonymous login explicitly; I also suggest to use the chroot cage to prevent a user from wandering...
Suggestions: anonymous_enable=NO , chroot_local_user=YES; doing so a remote intruder cannot escape from the home directory and an anoymous will not be able to access your server.

Have a nice experience,
please ask by commenting down here if you need more help and click the up arrow if I helped you.

0

Just one possible cause: you did not set the password of ftp user "demo".

Use passwd demo to set it.

And I also saw some tutorials saying create a file under /etc/vsftpd/ and use db_load to load it into a Berkeley .db file. It seems this doesn't work, the .db file makes no difference.