1

I'm using a GUI FTP client (WinSCP) to connect the remote FTP server (which is powered by vsftpd on Cent OS).

The GUI logs show that I can connect to the server but it was stucking on retrieving directory listing... and finally timeout!

enter image description here

enter image description here

Also I'm following an answer to vsftpd error Listing Directories and have configured my vsftpd.conf, but still failed.

Anybody some clues?

vsftpd.conf sample:

dirlist_enable=YES
hide_file=no

ftp_data_port=20
listen_port=21

pasv_enable=YES
pasv_min_port=64000
pasv_max_port=64321
port_enable=YES

pasv_address=1**.**.**.**
pasv_addr_resolve=YES

local_root=/var/ftp/pub
5

You have to open the port range 64000-64321 in the local firewall on the server. And if there are any external firewalls or NAT's, configure these to allow/route the port range too.

See also a relevant WinSCP article to understand, what network configuration is needed for the passive FTP.

  • It may not be necessary to open the ephemeral ports explicitly if you use a staeful firewall (which CentOS) does and you configure it for RELATED connections. – Iain Jan 11 '16 at 9:52
  • True, but only for unecrypted FTP, which one should not use anyway. For encrypted FTP (over TLS), this cannot help. It's covered in the last section of the article. – Martin Prikryl Jan 11 '16 at 9:55
  • Hi the WinSCP guy, open the port range fixes this issue. – Sam Su Jan 12 '16 at 2:06
1
  • Check your VSFTPD logs and take appropriate action.
  • If SELinux is enabled check /var/log/audit.audit.log for relevant messages and take appropriate action.
  • Ensure that your firewall is configured to allow port 21 and RELATED connections.

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.