Ftp – Passive mode FTP (vsftpd) error listing directories and timeout

ftpvsftpd

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

Best Answer

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.