Filezilla FTP Server Fails to Retrieve Directory Listing
Asked Answered
H

26

114

I'm running Filezilla Server 0.9.45 beta to manage my server remotely. After setting it up, I tested connecting to it using the IP 127.0.0.1, and it worked successfully. However, to connect to the server remotely, I port forwarded to port 21, and tried to connect using my computer's IP.

Status: Connecting to [My IP]:21...
Status: Connection established, waiting for welcome message...
Response:   220 Powered By FileZilla Server version 0.9.45 beta
Command:    USER hussain khalil
Response:   331 Password required for user
Command:    PASS *********
Response:   230 Logged on
Status: Connected
Status: Retrieving directory listing...
Command:    CWD /
Response:   250 CWD successful. "/" is current directory.
Command:    PWD
Response:   257 "/" is current directory.
Command:    TYPE I
Response:   200 Type set to I
Command:    PORT 192,168,0,13,205,63
Response:   200 Port command successful
Command:    MLSD
Response:   150 Opening data channel for directory listing of "/"
Response:   425 Can't open data connection for transfer of "/"
Error:  Failed to retrieve directory listing

This continues to work locally, but not when connecting remotely... How can I fix this?

Hermosa answered 4/7, 2014 at 4:25 Comment(1)
Hay All, How about in prestashop? I've tried the Cary's answer with sftp.pswebstore.com, but status says Connection attempt failed with "ECONNREFUSED - Connection refused by server"Derrek
C
38

When you send the port command to your server, you are asking the server to connect to you (on the remote network). If the remote network also has a NAT router, and you have not port-forwarded the port you are sending with your PORT command, the server will not be able reach you.

The most common solution would be to send the PASV command to the server instead of the PORT command. The PASV command will ask the server to create a listening socket and accept a connection from the remote machine to establish the data connection.

For the PASV command to work, you will also need to port-forward a range of ports for the passive data connections. The passive connection ports (which need to be forwarded) should be listed in the FileZilla documentation.

Catina answered 4/7, 2014 at 8:55 Comment(3)
I have set a custom port range in the Passive Mode Settings (Port 50000 to 50100) and port-forwarded those ports. I also set the transfer type to Passive instead of Active. No Result.Hermosa
I was testing from my LAN. External connection worked.Hermosa
A. What does "port-forwarded those ports" mean? A command in Ubuntu to forward those ports?Trimer
D
156

I just changed the encryption from "Use explicit FTP over TLS if available" to "Only use plain FTP" (insecure) at site manager and it works!

Dogger answered 18/1, 2015 at 21:19 Comment(8)
If you want security this is a bad idea.Magisterial
@Magisterial So what's the way to ensure security as well as retrieving the directory listing?Stannary
@Stannary you have to use FTPS. This answer says to disable security. Vaggelis clear states this is insecure. The most likely reason the PASV command is failing is that the FTP Server is sending a response but the firewall is not allowing outbound communication on those ports. See San Bergam's answer in the accepted response.Magisterial
@Stannary the detailed technical explanation is here: wiki.filezilla-project.org/Network_Configuration - I had to look at that a bit before I understood the difference between active and passive, and explicit versus implicit FTPS. My issue ended up being the firewall was blocking the implicit FTPS port range, which I set to 50,000 - 55,000. Once the network admin explicitly allowed outbound on those ports, it worked perfectly.Magisterial
Take note that this will really disable your security, yes it will worked but in can leave a problem sooner or later!Dryad
Don't throw security to trash.Cortex
Its works for me also. Maybe this is related to SSL, right?Squalid
I am using IIS ftp how can i do this ?Gokey
M
102

File > Site Manager > Select your site > Transfer Settings > Active

Works for me.

Mercie answered 22/11, 2016 at 10:28 Comment(5)
or you can try this one : Edit > Settings > Connection > FTP > Look at Transfer Mode (change passive to active )Deflected
OMG Finally! After reading the same crap with encryption type and firewall 10000 times this one worked!Kipper
This one really works. Just the active parts a bit trickyOribella
Ov you are bestCriseldacrisey
Not worked in my caseGokey
D
39

Most of the answers here involves configuring, actually just by adding sftp:// on your host (see below image) you can instantly fixed that kind of problem, works for me.

enter image description here

And also take note that if you follow Vaggelis guide you are lowering your security, sftp is better than using plain ftp.

I just changed the encryption from "Use explicit FTP over TLS if available" to "Only use plain FTP" (insecure) at site manager and it works!

Dryad answered 31/7, 2015 at 6:1 Comment(4)
It can't work in prestashop. I've tried sftp.pswebstore.com, but status says Connection attempt failed with "ECONNREFUSED - Connection refused by server".Derrek
This is actually the best answer!Ulund
While using SFTP is probably much better, it's a completely separate protocol. This is like answering "how do I fix this problem on my BBS?" with "use HTTPS instead."Xanthin
Getting this Error: Connection timed out after 20 seconds of inactivity Error: Could not connect to serverGokey
C
38

When you send the port command to your server, you are asking the server to connect to you (on the remote network). If the remote network also has a NAT router, and you have not port-forwarded the port you are sending with your PORT command, the server will not be able reach you.

The most common solution would be to send the PASV command to the server instead of the PORT command. The PASV command will ask the server to create a listening socket and accept a connection from the remote machine to establish the data connection.

For the PASV command to work, you will also need to port-forward a range of ports for the passive data connections. The passive connection ports (which need to be forwarded) should be listed in the FileZilla documentation.

Catina answered 4/7, 2014 at 8:55 Comment(3)
I have set a custom port range in the Passive Mode Settings (Port 50000 to 50100) and port-forwarded those ports. I also set the transfer type to Passive instead of Active. No Result.Hermosa
I was testing from my LAN. External connection worked.Hermosa
A. What does "port-forwarded those ports" mean? A command in Ubuntu to forward those ports?Trimer
R
20

Ok this helped a lot, I couldn't find a fix.

Simply, I already port forwarded the FTP port to my server. (The default is 14147, I'll use this as example)

Go to Edit > General settings, Listening port should be the one your using, in this case 14147.

Then go to Passive Mode Settings, I checked "Use Custom Port", and entered in the Range 50000 - 50100.

Then on your router, port forward 50000 - 50100 to the server IP locally.

IPv4 specific settings I left at default, reconnected my client, and bam now the file listing appears.

Ensure your servers firewall has an inbound rule set to accept 14147, and 50000-50100.

Basically what Evan stated. I can't attest to the security of opening these ports, but this is what finally got my Filezilla client and server to communicate and view files. Hope this helps someone.

Reddick answered 1/10, 2014 at 3:30 Comment(6)
"Ensure your servers firewall has an inbound rule set to accept 14147, and 50000-50100" -> this comment save my daysWeltschmerz
I have just installed FileZille Server at work and I can get through my folder with FileZille Cliet. Th issue is when I am trying to connect via PHP using nicolab's library. I keep on getting "Unable to connect" exception. Any ideas? I know this may have everything to do with our company's firewall. Thanks in advance.Kirstinkirstyn
Thats the key "Ensure your servers firewall has an inbound rule set to accept 14147, and 50000-50100." Thanks mate, upvoted!Loser
Found that my ports (40110-40310) were closed i thought 21 was enoughBeasley
this solition solved my problem.Playlet
Worked for me. I had to allow that range of ports in Windows FirewallCalie
A
13

I solved this by going into Site Manager -> selected the connection that Failed to retrieve directory listing -> Switched to tab "Transfer Settings" and set "Transfer Mode" to "Active" instead of "Default". Also check if you are connected via VPN or anything similar, this can also interfere.

Armelda answered 4/4, 2016 at 7:51 Comment(2)
If you are voting down, please say why because this worked for me.Armelda
3 years later, this was the solution for meBurushaski
S
10

My experience is that the new version of Filezilla has this problem, but not the old versions. I was using Filezilla and everything was OK. After I upgraded to version 3.10, I faced this problem and I couldn't solve it. I uninstalled version 3.10 and reinstalled version 3.8 and the problem was gone! Now I am using version 3.8 and everything is OK. I prefer to face no problems even if I have to use old versions. ;)

Try installing the old version and do not upgrade, however odd that may sound.

Strabismus answered 8/1, 2015 at 21:43 Comment(2)
i just downloaded 3.8 version from here, with Encryption: 'Plain Ftp' and Transfer settings: 'Passive'Octaviaoctavian
I have a weird situation where I can access various sites using FileZilla client (3.22) using TLS, But one site I can only access using plain FTP. This has happened sometime in the last few months (since the last time I went to this site) because it used to work fine with TLS.Cypro
C
8

Run Windows Defender Firewall with Advanced Security

Start > Run : wf.msc

enter image description here

Charlesettacharleston answered 4/4, 2019 at 7:4 Comment(0)
A
4

I've had the same problem, This was due to the firewall. I use windows server,

Can you allow the connection permission for program, intead of port 21,22 permission.

Windows Firewall with Advanced Security->
Inbound Rules->
Add Rule->
Program->
"Select Filezilla path with Browse button"->
Allow the Connection
Acropolis answered 28/10, 2018 at 23:17 Comment(1)
this worked. I was creating Port rules before this instead of Program rulesElora
W
3

I had the same problem-what worked for me -in Windows OS-is adding FileZilla as a firewall exception-under allow a program through firewall features

Waterlogged answered 21/4, 2015 at 17:27 Comment(0)
P
3

After about 2 hours experience;

  • Open > Windows Defender Firewall with Advanced Security
  • Select > Inbound Rules
  • Click > New Rule...
  • Choose > Custom
  • Choose > This program path:
  • Click > Browse
  • Find > filezilla-server.exe (possibly C:\Program Files\FileZilla Server)
  • Click > Open
  • Click > Next
  • Click > Next
  • Click > Next (Allow the connection is already selected)
  • Click > Next (if you do not need change)
  • Fill > Name
  • Click > Finish
Patricide answered 25/10, 2022 at 0:10 Comment(3)
Where to add this? on client or on server side or both ?Gokey
@Gokey just server side that I try to access by ftpPatricide
Tried but same result :(. I am using aws lightsail and the OS is Windows server 2016 Data center 64 BitGokey
J
2

I had Filezilla 3.6, and had the same issue as OP. I have upgraded to 3.10.3 thinking it would fix it. Nope, still the same.

Then I did a bit digging around the options, and what worked for me is:

Edit -> Settings -> FTP -> Passive Mode and switched from "Fall back to active mode" to "Use the server's external IP address instead"

Jeffjeffcoat answered 22/4, 2015 at 6:47 Comment(0)
D
2

The issue of mine was the same but the solution was a little different.

I used the AWS EC2 server to host the WHM service. And found that "the passive ports are enabled, but not these Ports are not found in my EC2 Security Group".

[root@94367392 ~]cPs# egrep -i passiveport /etc/pure-ftpd.conf

Output:

PassivePortRange 49152 65534

Now I moved ahead and opened the ports from 49152 to 65534 in the Security group of EC2 and the Filezilla problem related to "Failed to retrieve directory listing" was solved and it worked like a charm.

This cPanel doc is helpful.

Devolution answered 28/9, 2021 at 18:9 Comment(0)
A
1

I experienced the same problem with FZ-client, while my notebook connected via WLAN and DSL/Router. In the Site Manager connection settings I was applied Host:ftp.domain-name, Encryption:Only use plain FTP (insecure) and User:username@domain-name. Then the FTP-client succesfully connected to my website server. More FTP connection information could be found in the CPanel of the webserver. Hope this helps.

Acriflavine answered 27/1, 2015 at 12:11 Comment(0)
K
1

I had that problem with my server hosted in the cloud. I only need the server a couple of times a year and so when I boot up my server the IP address changes. The new IP address then has to be updated on FTP Server passive mode settings!

The latest version of Filezilla works just fine!

Kerrison answered 3/10, 2016 at 15:4 Comment(1)
Similar experience here. I have a static IP, and I'm sitting behind a router. That static IP changed, and I had to update my passive mode settings to reflect the new IP.Umbra
B
1

It worked for me:

General -> Encryption -> Only use plain FTP

Transfer settings -> Transfer Mode -> Active

Consider that it is very insecure, and must be used only for testing.

Bretbretagne answered 29/10, 2020 at 4:39 Comment(0)
E
1

My issue was also the firewall. I'm using a Linux server with WHM/cPanel. Adding my IP to the quick allow solved my issue. I hadn't updated Filezilla and I don't think there were any changes to the server that should have caused it. However, I did move and my IP changed so maybe that was the problem. Good luck to everyone else with this insanely annoying issue.

how to access WHM firewall config

Encrata answered 19/1, 2021 at 15:24 Comment(0)
R
1

I tried all the solution, i used CyberDuck and it works..

Ritornello answered 7/2, 2023 at 12:29 Comment(0)
S
0

I also had the problem after upgrading to 3.10. I had versoin 3.6.02 hanging around and installed that. Problem solved.

Sowens answered 8/1, 2015 at 22:13 Comment(0)
B
0

If you're using VestaCP, you might want to allow ports 12000-12100 TCP on your Linux Firewall.

You can do this in VestaCP settings.

Bulldog answered 17/4, 2017 at 21:54 Comment(0)
R
0

Check if the ip address on the router is the same with the one on the ftp server. If not make sure it is the same. This should works perfectly.

Revulsive answered 21/12, 2017 at 17:22 Comment(0)
S
0

In my case, restarting my router which I used to connect to the internet worked. I think too much of connections were going from the same IP Address and when I restarted my router, possibly a new IP was assigned and now everything works fine, and passive mode gives good speed in directory listing.

Storey answered 4/12, 2018 at 19:34 Comment(0)
W
0

I've seen solutions that involve granting FileZilla full access via windows firewall. This is an alternative to that, if you know the IP of the connecting system and it's static, simply grant it full access to all ports via windows firewall.

Windows Firewall, Inbound Rules > Create a Rule > All Local Ports > Scope > This IP Address (the IP of the connecting system).

To me this is much safer than granting full access to FileZilla to all incoming ip addresses.

Once you've completed your transfer, you can then disable the rule.

Wheelchair answered 13/11, 2021 at 7:15 Comment(0)
A
0

I have disable IPv6 on my local Mac from System Preference->Network->{YourConnection}->Advanced->IPv6, I have selected Manually for IPv6.

After changing it back to Automatically fix the FileZilla issue.

Adessive answered 6/5, 2023 at 21:49 Comment(0)
M
0

Filezilla's error messages are not always showing giving the entire picture. Note that this very same error message may be caused by server side misconfiguration.

One client has recently changed their IP and faced the the same issue. Switching to active mode did not work and using TLS was mandatory.

At the end we had to create a firewall rule to allow the passive port range "10090-10100" for the specific client's IP in consideration.

After that the client was able to connect normally via passive mode and retrieve the directory listing.

So if you face this issue and everything else has failed, do check the firewall passive ports at server side.

Mede answered 9/7, 2023 at 8:48 Comment(0)
W
-1

Now in FileZilla, create a new Account 1. Host is the FTP Address - e.g. ftp.somewhere.com 2. Protocol is "SFTP-SSH File Transfer Protocol" 3. User ID is your Bluehost User Id 4. Password is your Bluehost Password 5. Click "Connect" to establish a connection with Directory Listing!

This resolve the issue with 3.10 for me. And I'm glad to have the Secure Access for all of my future file transfers. It should prevent security issues in the future.

Waterside answered 12/1, 2015 at 14:42 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.