Retrieving directory listing issue with FTP over TLS cPanel WHM Print

  • 83

This relates to cPanel servers running CSF.

Since a recent update to the FTP software client filezilla, you maybe unable to connect to your FTP account using filezilla's QuickConnect feature.

This is due to the encryption default now being "Use explicit FTP over TLS if available"

Here is example output showing the problem:

Status: Resolving address of
Status: Connecting to **.**.***.***:21...
Status: Connection established, waiting for welcome message...
Status: Initializing TLS...
Status: Verifying certificate...
Status: TLS connection established.
Status: Server does not support non-ASCII characters.
Status: Connected
Status: Retrieving directory listing...

It gets stuck here for a few seconds before.....

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 (64,91,234,132,155,152)
Command: MLSD
Error: Connection timed out after 20 seconds of inactivity
Error: Failed to retrieve directory listing

To resolve the problem we need to enable passive ports.

1. SSH into your server
2. nano /etc/pure-ftpd.conf
3. uncomment the line "PassivePortRange 30000 50000"
4. Ctrl + X then Y and Enter to save
4. nano /etc/csf/csf.conf
5. Add 30000:50000 to your allowed incoming tcp ports line like so
# Allow incoming TCP ports
TCP_IN = "20,21,22,25,26,53,80,110,2082,2083,2086,2087,2095,2096,3306,30000:50000"
6. Ctrl + X then Y and Enter to save
7. Login to WHM and restart the FTP and firewall services

You should now be able to connect via FTP using TLS

Was this answer helpful?

« Back