Connection to FileZilla FTP server works, but directory listing fails

9

3

I am trying to set up a local FTP server in my house. Whenever I connect to the account on the computer that hosts the server, everything works, but when I try connecting on another computer, the directory listing fails even though the account connection is successful. I have allowed port 21 TCP and UDP through the host's firewall and have added FileZilla Server to the list of programs allowed to communicate. How can I solve this?

DaveTheMinion

Posted 2014-03-17T01:14:20.130

Reputation: 4 578

Is there anything different between the two clients? It's been a while, but I seem to remember something similar happened to me when using two different clients that supported different commands for directory listing. – MBraedley – 2014-03-17T01:55:02.030

@MBraedley On the host, I am using the newest version of FileZilla, and for the other computer connecting, I am using a portable version of FileZilla that someone made. – DaveTheMinion – 2014-03-17T02:11:08.177

Answers

0

It turns out that it was not working because I did not have a range of ports set for the directory listing to pass through. Now that I have configured it, everything is working smoothly.

DaveTheMinion

Posted 2014-03-17T01:14:20.130

Reputation: 4 578

12

While this question is old, there's no really comprehensive answer. So I'm adding one.

In the passive FTP mode (the most common mode nowadays), the FTP server listens on port 21 for an FTP control connection. But for all data transfers, including directory listings, it listens on an additional port. The port is picked out of a configured port range.

If you open only the 21 control port on the firewall, you get the described behavior. You can connect, but you cannot list directories or transfer files.

For details, see my article on Network configuration for passive FTP mode.

You have to go to Control Panel > System and Security > Windows Firewall > Advanced Settings > Inbound Rules > New Rule and add a new inbound rule for data port range your FTP server is using.

Firewall inbound rule ports

The port range that the FileZilla FTP server is using, is configured in Edit > Settings > Passive mode settings > Use custom port rage. You can configure a narrow range (like 10 ports), to limit a number of opened ports. You should use port numbers 1024 and above (up to 65535).

FileZilla passive custom port range

Martin Prikryl

Posted 2014-03-17T01:14:20.130

Reputation: 13 764

1this answer helped me to realize that I needed to modify my aws ec2 security group to allow the range of passive ports I configured in the firewall for my windows ec2 instance. – Gavin Palmer – 2016-08-23T16:53:42.853

3

FTP needds more than port 21 (and it does not need UDP). The ports for the data connections are dynamic. If the server is behind a firewall you should try active FTP mode, if the client is behind firewall you should try passive mode. If both are behind restrictive firewalls which are not able FTP as a special protocol you are out of luck.

Steffen Ullrich

Posted 2014-03-17T01:14:20.130

Reputation: 3 897

I'm on Windows 8.1 Pro. Can I enable active FTP mode? If so, how? – DaveTheMinion – 2014-03-17T09:49:34.810

I sure you can, but the details depend on the ftp client you use. Just look at its documentation. – Steffen Ullrich – 2014-03-17T13:05:24.253

2

Try changing the Transfer mode to "Active".

To address this FTP error, follow below steps:

  1. Open Filezilla, go to Edit -> Settings
  2. Click on Connection -> FTP: Choose Active
  3. Click on Connection -> FTP -> Active Mode: Select “Ask your operating system for the external IP address”
  4. Click on Connection -> FTP -> Passive Mode: Choose Fall Back to Active Mode

Follow steps in url: FTP error “Failed to retrieve directory listing”

Sachin Dhir

Posted 2014-03-17T01:14:20.130

Reputation: 21

1External links can disappear or be unavailable, in which case your answer would have little value. Please add the essential points from the link to your answer. Thanks. – fixer1234 – 2014-12-30T07:41:22.057

0

Or create an account by opening up site manager.

click new site in host use your host name. Choose logon type as normal. provide your username and password.

Protocol use ftp and encryption : only use palin ftp

Ashutosh Narayan Jha

Posted 2014-03-17T01:14:20.130

Reputation: 1