WHM/cPanel

Solve FTP Connection fails passive mode on Pure FTP configserver

Error Case: Failed to retrieve directory listing

you configured your domain name with cpanel and add your FTP username and password correctly , when you are trying to connect to your website using filezilla software your are getting the following error:
    
     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
    
   

How to solve FTP Failed to retrieve directory listing from CSF ConfigServer Security & Firewall

the issue with this ftp error that your server is blocking the Passive port range 30000 35000 , so we have to allow those port range from configserver by allowing TCP_IN , to do that you can do it by 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:
    1. Login to the server via SSH as root
    2. Edit /etc/csf/csf.conf and look for the line that begins with: TCP_IN
    3. add 30000:35000 to TCP_IN section .
    4. Run csf -r to reload the config in the live firewall

Solve Failed to retrieve directory listing Over SSL

In this scenario you can 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 . 

You can follow the same steps as above but replace the port range on those steps with 60000:60100

XsoftHost Support

Share

Recent Posts

Add Extra IP addresses to server configuration On Ubuntu 17.10 and later

Each failover IP address will need its own line in the configuration file. The configuration…

4 years ago

Create RAID Arrays with mdadm on Ubuntu

What is mdadm? The mdadm utility can be used to create and manage storage arrays…

4 years ago

How to change the maximum upload file size for PHP

There are several scenarios that you might need to increase or decrease your php maximum…

6 years ago

How to install Let’s Encrypt Plugin in WHM/cPanel

What is Let’s Encrypt? Let’s Encrypt is a free certificate authority provided by the Internet…

6 years ago

How to install python in my cPanel and add py extension

Python normally installed on all cPanel hosting server because most of Centos/red hat update system…

6 years ago

How to install and enable GUI GNOME Desktop on centos 7

Usually CentOS 7 comes in a numbers of variants, For most users, there are two…

6 years ago