1

I created a FTP user for a Linux server and used filezilla to connect with that server.

I am seeing login is success but directory listing is failed. Is there any change that I missed ? enter image description here

My vsftpd.conf file contains,

chroot_local_user =YES
local_enable = Yes
idle_session_timeout=600
pasv_min_port=2121
pasv_max_port=2142
log_ftp_protocol=YES
syslog_enable=YES
pasv_enable=YES

I opened 2121 to 2142 ports in UFW.

  • I would open all port between 2121 and 2142. – Archemar Feb 13 '18 at 11:03
  • Your vsftpd.conf is not being take into account, as the server obviously uses a different passive port range. The first connection goes to 6084, the second goes to 48621. + Post a full text log file of FileZilla, not screenshot of a part of the log. – Martin Prikryl Feb 13 '18 at 11:13
  • You know you're giving away your IP address in the screenshot? It starts with 139 and is hosted by linode.com. BTW, the client wouldn't happen to have a firewall too? – Gerard H. Pille Feb 13 '18 at 11:36
  • Weclome on the Unix SE! I you can copy-paste text instead of uploading screenshot, do the first! It is important. Now as a new user it will be probably tolerated from you, but it would be still better if you would replace the screenshot with a copy-paste (if it is possible). – peterh Feb 13 '18 at 14:58
1

You should check the logfile (in some cases /var/log/syslog or /var/log/messages if not specified). You can set it with this parameter in /etc/vsftpd.conf:

xferlog_file=/var/log/vsftpd.log  

Don't forget to restart the service, try again and check the logfile for entries.

In most cases it is a permission problem in a parent directory that the user can not enter this directory. I just see "/var/www" in your post and it is possible that you missed the "x" flag for some folder permissions. If they are owned by an other user and/or group, you probably need to set it to "others".

Furthermore you should check the file /etc/shells. It should contain the users shell for logging in. This mistake is done very often that a user is added with /bin/false but the shell is not allowed in this file so you get logged out with an error.

Last but not least: Try to run the service without 'chroot_local_user=YES' to check if it is a login or permission problem.

But first of all: check your logs to find a hint. They should provide something to you.

1

The passive mode connection can't be established. There is most likely an issue with the tcp traffic not being able to be sent/received over passive mode ports between your ftp client and the ftp server.

  • Check local firewall on your client.

  • Check firewall and port forwarding on your internet router.

  • Double check UFW settings on your server. ufw status verbose should list a line like this: 2121:2142/tcp ALLOW IN Anywhere

  • Look for other issues. Maybe this one: adding seccomp_sandbox=NO.

-1

You have set chroot_local_user to YES and in the image, the FTP server is trying to open /var/www/.... - is that the local users home directory?

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.