Retrieving directory listing issue with FTP over TLS cPanel WHM

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 yourdomainname.co.uk
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

  • 72 Users Found This Useful
Was this answer helpful?

Related Articles

What Is Anonymous FTP or SFTP?

Anonymous FTP is a setting which allows users to login to your FTP server anonymously by not...

What is an FTP or SFTP account?

FTP (File Transfer Protocol) is a method used to transfer files between your computer and the web...

Which directory do my files go in?

By default, logging into FTP will open the root directory of your account. In order for files to...

Login to FTP or SFTP via Windows Explorer

Open any Windows Explorer window (My Pictures, My Documents, My Music, etc) Replace the text...

My FTP client says too many connections

The server will often reject a new FTP connection if too many are open for any given account. If...