Error Case: Failed to retrieve directory listing
Command: PWD Response: 257 “/” is your current location Command: TYPE I Response: 200 TYPE is now 8-bit binary Command: PASV Response: 227 Entering Passive Mode Command: MLSD Error: The data connection could not be established: ETIMEDOUT – Connection attempt timed out Error: Connection timed out after 60 seconds of inactivity Error: Failed to retrieve directory listing
Solve FTP Failed to retrieve directory listing from CSF ConfigServer Security & Firewall
When you see ftp error massage that is because your server is blocking the Passive port range 30000 35000, so we have to allow those port range from configserver by allowing TCP_IN , follow one of these two ways:
- From your WHM Home »Plugins »ConfigServer Security & Firewall , Allow incoming TCP ports on TCP_IN = then add the following port range 30000:35000 and press Change Button, and CSF will ask for restart the configserver to take effect , Click Restart Csf+ldf button, then you will be able to connect to your FTP site without any issue.
- Or you can do the following step:
- Login to the server via SSH as root.
- Edit /etc/csf/csf.conf and look for the line that begins with: TCP_IN
- add 30000:35000 to TCP_IN section.
- Run csf -r to reload the config in the live firewall.
Solve FTP Failed to retrieve directory listing Over SSL
When you face this case just connect via FTP on plain text (none secure connection ), but unable to use FTP over TLS, you are getting the Error:Failed to retrieve directory listing. Follow the same steps as above after replacing the port range on those steps with 60000:60100.