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.

  • Just a note, please consider using SFTP instead of FTP if you have the choice. It's also a lot easier setting up, usually, in addition to being more secure: en.wikipedia.org/wiki/SSH_File_Transfer_Protocol – pzkpfw Feb 25 '14 at 15:19
  • The principle reason for using vsftpd is eash chroot jail and using sftp is harder to do on different UNIX dialects. In fact, the best way is through a thirdparty SFTP daemon made in the UK. – TekOps Feb 13 '17 at 18:22
4
  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

| improve this answer | |
  • Thanks for this info, I added a user which uses both /sbin/nologin and /bin/bash, I had to userdel then sudo useradd -m -s /bin/bash userso it can use only bash. It succeed to connect then – debugging XD Jul 4 '18 at 10:49
0

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.

| improve this answer | |
  • Thanks your reply, I didn't have /etc/vsftpd directory, I try to use apt-get remove vsftpd and apt-get install vsftpd to reinstall vsftpd, But still not have /etc/vsftpd – TangMonk Feb 26 '14 at 2:48
  • Then look for /etc/vsftpd.conf ; if you can't find it follow this topic: askubuntu.com/questions/47260/where-is-vsftpd-conf – Lorenzo Ancora Feb 26 '14 at 14:36
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.

| improve this answer | |

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.