How to Fix: FileZilla Server 'Failed to Retrieve Directory Listing' Error

Dennis Faas's picture

Infopackets Reader Carl S. writes:

" Dear Dennis,

I am frequently on the road with my laptop and need to access my files at home on the PC. I have installed FileZilla FTP Server (version 0.9.60 beta) and it works fine at home but when I am remote, I get the error: 'failed to receive directory listing', and then it disconnects. I am currently using Port 21 to host the FTP and have added it to my firewall, but I don't understand why FileZilla server can't retrieve the directory listing by remote. Can you help? "

My response:

I asked Carl if he would like me to connect to his system using my remote desktop support service, and he agreed.

When issues like this happen where it works for one instance but doesn't work for another - in this case, the FTP works locally but not by remote - the first thing to try is to disable the firewall to see if that makes any difference. Carl was using the Windows Firewall, so I disabled that and was able to connect to his FTP server using my system by remote. This told me it was a firewall issue.

After more research on the topic I discovered that FileZilla uses "passive mode" (by default) to send and receive files as well as directory listings. This is often done on random TCP ports, even though port 21 is reserved for FTP service on the host machine and for incoming connections. Obviously this poses a problem because it would not be wise to configure the firewall to allow random TCP IP connections (or a full range of them), as that would be a security risk.

To fix the issue, the FileZilla Server "passive mode" port setting must be limited to a finite number to make it a viable firewall rule. In Carl's case, I set FileZilla's passive port to 2100, then configured the Windows Firewall to allow TCP ports 21 and 2100 for incoming and outgoing connections. This solved the problem.

How to Fix: FileZilla Server 'Failed to Retrieve Directory Listing' Error

Below I'll explain what I did using step-by-step instructions in case anyone else is facing the "failed to receive directory listing" on a remote connection as it pertains to a firewall:

  1. Launch the FileZilla Server Interface on the 'server' computer.
  2. On the FileZilla Server Interface, click Edit -> Settings; the FileZilla Server Options window will appear. On the left of the window, click the "passive mode settings" option. At the top of the window under the heading "Passive mode settings", check mark "use custom port range" and enter in 2100-2100 as the range. Click OK, then close out the FileZilla Server Interface.
  3. Launch your Firewall to allow incoming and outgoing connections on Ports 21 and 2100. If you are using the Windows Firewall, do the following: Click Start, then type in "Windows Firewall"; wait for "Windows Firewall with Advanced Security" to appear in the list and click it.

    Left click "Inbound rules" near the top left of the Windows Firewall window, then right click over top of that and select "New rule". The "New inbound rule Wizard" will start; under the heading "What type of rule would you like to create?" click the "Port" option, then click "Next". On the proceeding window, click "TCP" and where it says "Specific ports", enter in "21,2100", then click "Next". On the proceeding window, click "Allow connection", then click "Next".

    The next window will ask "Where does this firewall rule apply" - click "Domain", "Private" and "Public" (or whatever you want), then click "Next". On the proceeding window, enter in the name of the firewall rule. In this case I called it "Filezilla Server ports 21,2100" and click "Finish".
  4. Repeat the exact same steps for "Outgoing rules".
  5. Test the connection by remote to see if you can connect to your FTP server. It should work.

Additional 1-on-1 Support: From Dennis

If all of this is over your head, or if you're still having issues setting up an FTP server, I can help using my remote desktop support service. Simply contact me, briefly describing the issue and I will get back to you as soon as possible.

Got a Computer Question or Problem? Ask Dennis!

I need more computer questions. If you have a computer question -- or even a computer problem that needs fixing -- please email me with your question so that I can write more articles like this one. I can't promise I'll respond to all the messages I receive (depending on the volume), but I'll do my best.

About the author: Dennis Faas is the owner and operator of With over 30 years of computing experience, Dennis' areas of expertise are a broad range and include PC hardware, Microsoft Windows, Linux, network administration, and virtualization. Dennis holds a Bachelors degree in Computer Science (1999) and has authored 6 books on the topics of MS Windows and PC Security. If you like the advice you received on this page, please up-vote / Like this page and share it with friends. For technical support inquiries, Dennis can be reached via Live chat online this site using the Zopim Chat service (currently located at the bottom left of the screen); optionally, you can contact Dennis through the website contact form.

Rate this article: 
Average: 5 (4 votes)