Est. reading time: 2 minutes
FTP - Resolving "Failed to retrieve directory listing"

FTP – Resolving “Failed to retrieve directory listing”

You enter all the FTP details from HOSTAFRICA in Filezilla, click on “connect” and… connection is successful, but no file listing appears or you get an error “Failed to retrieve directory listing”.

“Why is this happening and what do I do now?” You ask yourself.

Well, that’s what we’re here to help you with.

Although this is aimed at Filezilla clients, the principles in this guide will work for any other FTP client as well.

Before we get into the solution, let’s first answer your question “Why is this happening“.

Why?

Let’s have a quick look at the FTP protocol. In the early days of file transfer, IP addresses were plentiful and the internet was a trusting place.

Your server could be easily accessed and the clients were on public IP addresses, this connection was a straightforward one-to-one session.

Then came the internet of data theft, viruses and malware. Hence the rise of firewalls. IP addresses were also getting scarcer and users more plentiful.

Now we had to put multiple users behind NAT (Network Address Translation) firewalls and as a result FTP stopped working in its default “ACTIVE” or one-to-one mode.

So the use of FTP PASV or PASSIVE mode became more common. This mode enabled FTP connections to be established through a firewall by letting the client dictate the connection and opening extra ports for the data streams.


Back to our problem and the solution

Most FTP clients default to “ACTIVE” mode and this connects fine, but fails when the server tries to send data back to us. So, we have to switch to PASSIVE(PASV) mode to enable the data to reach our client.

To do this, locate the “Transfer Settings” in Filezilla’s “Site Manager“.

Site Manager

Change the mode to “Passive” and click “OK” to save.

The other setting which could affect your connectivity is the encryption method.

There are four encryption method options in Filezilla. Choose each one in turn, click OK and connect to see if it works.

FTP TLS or SSL

One of these modes will usually work. Always try from top to bottom as we always try for the encrypted connections first to be more secure.


In closing

FTP is a wonderful tool for moving data to and from the internet and once it works, it works very well. At HOSTAFRICA we also provide FTP space as an “Addon” to any of our hosting packages at a very reasonable rate per GB.

Also, make sure that you have a good idea of the size of data you have stored as most service providers will assign you a certain data “quota” ie 10GB or 20GB, etc. depending on what you are paying for.

Once you have filled the quota, you could find new uploads merely failing as some ftp servers and/or clients are not very good at giving explicit errors.

Happy Hosting! 🙂


The Author

Michael O.

Michael is the founder, managing director, and CEO of HOSTAFRICA. He studied at Friedrich Schiller University Jena and was inspired by Cape Town's beauty to bring his German expertise to Africa. Before HOSTAFRICA, Michael was the Managing Director of Deutsche Börse Cloud Exchange AG, one of Germany's largest virtual server providers.

More posts from Michael

Related posts