Unable to retrieve Directory Listing

Need help with FileZilla Client? Something does not work as expected? In this forum you may find an answer.

Moderator: Project members

Post Reply
Message
Author
pdxpogo
500 Command not understood
Posts: 4
Joined: 2005-01-06 08:46
Location: Oregon

Unable to retrieve Directory Listing

#1 Post by pdxpogo » 2005-01-06 09:15

A friend has an ftp site and he cannot retrieve a directory listing. He was connecting in passive mode.

He sent me his username and password and I connect fine using filezilla in active mode. I had him download filezilla and we set our programs up identically (the differences being I'm a win98 behind a router using NAT and he is XP Home SP2).

I have a trace of his session here goes edited for sensitive information

FileZilla started (01/06/2005 07:53:09)
Status: Connecting to xxx.xxx.xxx.xxx ...
Trace: FtpControlSocket.cpp(694): OnConnect(0) OpMode=1 OpState=-1 caller=0x00aa9728
Status: Connected with xxx.xxx.xxx.xxx. Waiting for welcome message...
Trace: FtpControlSocket.cpp(565): OnReceive(0) OpMode=1 OpState=-1 caller=0x00aa9728
Response: 220 ProFTPD 1.2.9rc2 Server (ProFTPD) [kaboom.jplt.com]
Command: USER xxxxxxx
Trace: FtpControlSocket.cpp(565): OnReceive(0) OpMode=1 OpState=0 caller=0x00aa9728
Response: 331 Password required for xxxxxxx
Command: PASS ********
Trace: FtpControlSocket.cpp(565): OnReceive(0) OpMode=1 OpState=3 caller=0x00aa9728
Response: 230 User xxxxxxx logged in.
Status: Connected
Trace: FtpControlSocket.cpp(2980): ResetOperation(1) OpMode=1 OpState=-2 caller=0x00aa9728
Trace: FtpControlSocket.cpp(833): List(FALSE,0,"","",1) OpMode=0 OpState=-1 caller=0x00aa9728
Status: Retrieving directory listing...
Command: PWD
Trace: FtpControlSocket.cpp(565): OnReceive(0) OpMode=4 OpState=0 caller=0x00aa9728
Response: 257 "/" is current directory.
Trace: FtpControlSocket.cpp(833): List(FALSE,0,"","",0) OpMode=4 OpState=0 caller=0x00aa9728
Command: PORT xx,xx,xxx,xxx,8,57
Trace: FtpControlSocket.cpp(565): OnReceive(0) OpMode=4 OpState=5 caller=0x00aa9728
Response: 200 PORT command successful
Trace: FtpControlSocket.cpp(833): List(FALSE,0,"","",0) OpMode=4 OpState=5 caller=0x00aa9728
Command: TYPE A
Trace: FtpControlSocket.cpp(565): OnReceive(0) OpMode=4 OpState=6 caller=0x00aa9728
Response: 200 Type set to A
Trace: FtpControlSocket.cpp(833): List(FALSE,0,"","",0) OpMode=4 OpState=6 caller=0x00aa9728
Trace: TransferSocket.cpp(442): SetActive() caller=0x00aacfd0
Command: LIST
Trace: FtpControlSocket.cpp(565): OnReceive(0) OpMode=4 <Diff!!! OpState=7 caller=0x00aa9728
Response: 150 Opening ASCII mode data connection for file list
Trace: FtpControlSocket.cpp(833): List(FALSE,0,"","",0) OpMode=4 OpState=7 caller=0x00aa9728

That is it no more data occurs until timeout and disconnect.

When compared to my successful trace I notice there is no On Accept for a socket after the list command

Good Trace everything is the same until

Command: LIST
Trace: TransferSocket.cpp(329): OnAccept(0) caller=0x00fb47f0
Trace: FtpControlSocket.cpp(578): OnReceive(0) OpMode=4 OpState=7 caller=0x00fb3f60
Response: 150 Opening ASCII mode data connection for file list
Trace: TransferSocket.cpp(167): Message waiting in queue, resuming later caller=0x00fb47f0
Trace: FtpControlSocket.cpp(846): List(FALSE,0,"","",0) OpMode=4 OpState=7 caller=0x00fb3f60
Trace: TransferSocket.cpp(428): OnClose(0) caller=0x00fb47f0
Trace: TransferSocket.cpp(955): Close() caller=0x00fb47f0
Trace: TransferSocket.cpp(955): Close() caller=0x00fb47f0
Trace: FtpControlSocket.cpp(1451): TransferEnd(4) OpMode=4 OpState=8 caller=0x00fb3f60
Trace: FtpControlSocket.cpp(846): List(TRUE,0,"","",0) OpMode=4 OpState=8 caller=0x00fb3f60
... the directories list fine

Any ideas? If I am in passive mode I fail the same way he does in "active" mode. He also fails in passive mode.

He cannot get ws_ftp to work either same failure to get directory listing. I am thinking there is something wrong with his XP setup but am unsure as commands up to the "List" seem to work well and he can ftp to my server without any problems...It is very strange.

User avatar
botg
Site Admin
Posts: 35563
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

#2 Post by botg » 2005-01-06 09:44

Please read the FAQ here both in the client and the server subforum. Proper configuration of routers and firewalls is explained there.

pdxpogo
500 Command not understood
Posts: 4
Joined: 2005-01-06 08:46
Location: Oregon

Great Non Answer

#3 Post by pdxpogo » 2005-01-06 17:40

I have read the Faq. Both here and in the Server forum. If you do not KNOW what the answer is why not say so. OK proper firewall setup is necessary, can you explain why the firewall is NOT setup correctly? What is the difference according to a firewall between a PWD command and a LIST Command?

Your help was NO help. It seems to be a common complaint with the same non answer given every time. I understand why you cannot trouble shoot every firewall router problem in the world but if the program filezilla doesn't provide enough information for a reasonably educated person to fix the problem what does this forum exist for?

RTFM is not an answer I wouldn't be here if I hadn't done my homework.

I understand different servers have different versions of FTP and different security settings. Specifically why does Filezilla work for me and not for my friend when we have the same setup going for the same server?

OK his Windows XP security settings may be wrong... May I ask which ones have been found to intefere with the list command? He has his XP firewall disabled for the testing we did.

My problem is understanding how some ftp commands will work and others do not. FTP is a straight up protocol text based communication via ports if the ports are open for one command shouldn't they be open for all? It appears to me from the trace information provided that filezilla did not open/activate a socket after the list command was issued in the failing case. Any ideas why?

User avatar
botg
Site Admin
Posts: 35563
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

#4 Post by botg » 2005-01-06 18:53

I've written all this so often, a little search in the forum as well as reading the FAQ should have helped. I get around a dozen of mails like your original posting each day, I just don't have the time to write anything more detailed like "RTFM, search the forums"

Anyhow, here's everything again with slightly different words:

The FTP protocol uses additional connections for transfers. Those additional connections can be created in two ways:
1. Active mode: Server opens connection to client
2. Passive mode: Client opens connection to server

(In the following the client is on your machine)
In order for active mode to work, the ports used for active mode (see client settings dialog) have to be forwarded/allowed/whatever to your machine in your router/firewall. Also the external ip address may have to be set in the client.

In order for passive mode to work basically the same has to be set up on the server side so that the server's router/firewall forwards/allows the specified ports.

In addition to that, using some firewalls, it's currently not possible to connect both locally as well as externally to the server, only one of it may work for a given configuration.

jhagstrand
500 Command not understood
Posts: 3
Joined: 2005-01-06 19:30

#5 Post by jhagstrand » 2005-01-06 19:36

I have a similar problem. FileZilla is using Passive mode but still won't transfer. Everything works fine in the command-line FTP on the same machine. So both the command-line program and FileZilla are going thru the same firewalls. What could be the problem?

pdxpogo
500 Command not understood
Posts: 4
Joined: 2005-01-06 08:46
Location: Oregon

Sorry, frustration was talking

#6 Post by pdxpogo » 2005-01-06 20:50

I did read through the forum and the FAQ perhaps your detailed explanation could be moved into the FAQ. Searching through the forum did not turn up your more detailed explanation I looked through some 10 to 15 pages.

I actually understand the differences between passive and active mode in FTP what I don't understand is why the firewall will pass certain commands and not others. It is not your job to school me I will look elsewhere for the information. I do appreciate the trouble you went through today and I apologize for being a grouch.

Filezilla has always worked for me through routers and firewalls NAT etc... never had to use passive mode once. Unfortunately I am not sitting at my friends desktop and have only his inexperience to deal with. I am assuming he is giving me good information but since he can reach my server with his current setup I have to think his firewall is set correctly to use an active transfer. I can reach the server in question with active mode from my setup, he cannot.

It is a conundrum.

Thanks again.

pdxpogo
500 Command not understood
Posts: 4
Joined: 2005-01-06 08:46
Location: Oregon

The answer to my question

#7 Post by pdxpogo » 2005-01-06 21:25

about the difference between a pwd and a list command is the difference between a control command and a data command. FTP uses two distinct mechanisms to transfer information.

A detailed FAQ is available at

http://www.maxum.com/Rumpus/FAQ/FTPOverview.html

Thanks

m2pc
500 Command not understood
Posts: 1
Joined: 2005-01-19 18:34
Location: California, USA

Passive Issue - SOLVED

#8 Post by m2pc » 2005-01-19 18:40

I had a similar issue with a new FileZilla install. I am running Win2003 Std Server and could NOT get Windows (via IE) to connect to my server. The login dialog would appear but it would throw an error each time it tried to continue further. I was able to connect from the same machine using the commandline FTP without problems.

After some fiddling, I had to change the FileZilla server settings to use ports 5000-5005 for PASSIVE transfers, then I had to open those ports up in my Win2003 server IP settings. The server I have is using the built-in software IP filters, so I added ports 5000 thru 5005 to the "Allow" list.

At first it didn't work, but after rebooting the server, now I can connect!

TheAngryPenguin
226 Transfer OK
Posts: 323
Joined: 2004-03-08 18:40

Re: Passive Issue - SOLVED

#9 Post by TheAngryPenguin » 2005-01-20 14:54

m2pc wrote:...After some fiddling, I had to change the FileZilla server settings to use ports 5000-5005 for PASSIVE transfers, then I had to open those ports up....
All of which is clearly stated in the FAQ as well as all throughout these searchable forums.

Post Reply