Empty directory?

Advertisement

Sheila_C
Joined:
Posts:
2

Empty directory?

I can connect to the remote server, but then it disconnects with the following message:
Timeout detected. (control connection)
Could not retrieve directory listing
Error listing directory '/'.
I have attached the log file. Towards the end it says <Empty directory listing>
Does this mean that something has deleted all the files in my directory???

Reply with quote

Advertisement

Jacob1
Guest

Most probably port permission issue

I will post here a (modified) old comment from another forum. You may want to check this out before you get a more authoritative response from Martin.
FTP uses two connections. "Control" to port 21, and "data" to a randomly chosen port for each transfer - including directory listing, which is probably why your directory appears empty. It is not empty - just the transfer to fetch its content listing failed.

If your client connects to the server for data, that is called "passive mode". You need to configure the FTP server to use the external IP address in the "PASV command reply", and - if using a firewall or NAT router - to use a specific port range.

In case of firewall/router, you also need to configure that to allow the PASV port range through / to port-forward that range.

Reply with quote

Sheila_C
Joined:
Posts:
2

Re: Most probably port permission issue

Jacob - I checked with the hosting service and they said that the server is configured to use the external IP address.

What is weird is that all 3 clients that I tried encounter the same problem, and say that the directory is empty and then they disconnect. However, the File Manager that is part of the hosting service (123ehost) works perfectly. I absolutely don't understand how that could happen. It is not as convenient as using WinSCP, but at least I have that for now.

I would really, really like to find out what is going on though. I have used this hosting service for many years without a problem until now, and the tech said that when he used FileZilla and my login, he had no problems. When I used it, I got the same answer as with WinSCP. Neither could access my directory. Additionally, I have been using Dreamweaver CS5 for many years, and now, all of a sudden, it could not see the directory. I am totally lost.

I completely shut down my anti-virus and firewall, and nothing changed.

I am not very knowledgeable with Client/Server stuff, and am very grateful for any help with this!

Thanks for any ideas!

Reply with quote

Jacob1
Guest

Did you check your router's NAT ?

Since all FTP clients on your system behave the same, and since your hosting provider said that the server is fine, most probably it is an issue with your own computer.
I completely shut down my anti-virus and firewall, and nothing changed.
That's a good action to take while investigating.

But also please check that your router (and your firewall when active) has port 21 and the passive (PASV) port ranges properly forwarded/allowed.
To do that, external port 21, used by the server (i.e. your hosting provider), should be forwarded to internal port 21 (the client, i.e. your computer), and the PASV port range (say 50000-50009 - those are server specific, and normally determined by the FTP server - check with your hosting provider) should also be forwarded in your router to your computer. If your router asks you to specify a protocol, select TCP.

See also https://superuser.com/questions/729876/connection-to-filezilla-ftp-server-works-but-directory-listing-fails

If the above doesn't help, please try to change your WinSCP connection method from Passive to Active. The port handling will be different. There is an explanation on how to do that somewhere on this forum/doc section.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,518
Location:
Prague, Czechia

Re: Did you check your router's NAT ?

There's no much to add to what @Jacob1 wrote (thanks).
Here's a link that covers similar topic as Jacob quoted above:
https://winscp.net/eng/docs/ftp_modes
You might also want to try to connect from another network (like a mobile hotspot) to rule out issues on your side.
(btw, the "Empty directory listing" record is irrelevant to your problem).

Reply with quote

Advertisement

You can post new topics in this forum