Simple FTP - Failed to retreive directory listing

Please post here if you have problems in using Wing FTP Server.
Post Reply
petemoss007
Posts: 6
Joined: Mon Mar 21, 2022 2:02 am

Simple FTP - Failed to retreive directory listing

Post by petemoss007 »

I setup a very simple just plain FTP domain for a printer/scanner to ftp into and drop of a scan. I'm testing using both Filezilla FTP client and WSFTP as a client. Niether work. I see in the logs that I'm connecting, the password is accepted, etc. but then I get the "failed to retreive directory listing" error and it disconnects. I'm also able to config the clients and the printer in active mode so I though I only needed to punch port 21 through my router. Am I incorrect? What am I doing wrong.

Here is what I see on the WingFTP side.
[04] Mon, 11 Apr 2022 12:10:53 (0000002) 220 Wing FTP Server ready...
[03] Mon, 11 Apr 2022 12:10:53 (0000002) USER printeruser
[04] Mon, 11 Apr 2022 12:10:53 (0000002) 331 Password required for printeruser
[03] Mon, 11 Apr 2022 12:10:53 (0000002) PASS **********
[04] Mon, 11 Apr 2022 12:10:53 (0000002) 230 User printeruser logged in.
[03] Mon, 11 Apr 2022 12:10:53 (0000002) CLNT FileZilla
[04] Mon, 11 Apr 2022 12:10:53 (0000002) 200 Noted.
[03] Mon, 11 Apr 2022 12:10:53 (0000002) OPTS UTF8 ON
[04] Mon, 11 Apr 2022 12:10:53 (0000002) 200 OPTS UTF8 ON
[03] Mon, 11 Apr 2022 12:10:53 (0000002) PWD
[04] Mon, 11 Apr 2022 12:10:53 (0000002) 257 "/" is current directory.
[03] Mon, 11 Apr 2022 12:10:53 (0000002) TYPE I
[04] Mon, 11 Apr 2022 12:10:53 (0000002) 200 Type is set.
[03] Mon, 11 Apr 2022 12:10:53 (0000002) PORT 66,82,19,156,195,241
[04] Mon, 11 Apr 2022 12:10:53 (0000002) 200 Port command successful
[03] Mon, 11 Apr 2022 12:10:53 (0000002) MLSD
[02] Mon, 11 Apr 2022 12:12:03 (0000002) Closed session, disconnected from 66.82.19.156

And here is what I see from Filezilla
Status: Connecting to 198.121.18.121:21...
Status: Connection established, waiting for welcome message...
Status: Plain FTP is insecure. Please switch to FTP over TLS.
Status: Logged in
Status: Retrieving directory listing...
Command: PWD
Response: 257 "/" is current directory.
Command: TYPE I
Response: 200 Type is set.
Command: PORT 10,4,20,10,231,56
Response: 200 Port command successful
Command: MLSD
Error: Connection timed out after 30 seconds of inactivity
Error: Failed to retrieve directory listing
Status: Disconnected from server
Status: Connecting to 198.121.18.121:21...
Status: Connection established, waiting for welcome message...
Status: Plain FTP is insecure. Please switch to FTP over TLS.
Status: Logged in
Status: Retrieving directory listing...
Command: PWD
Response: 257 "/" is current directory.
Command: TYPE I
Response: 200 Type is set.
Command: PORT 10,4,20,10,231,100
Response: 200 Port command successful
Command: MLSD
Error: Connection timed out after 30 seconds of inactivity
Error: Failed to retrieve directory listing
FTP
Site Admin
Posts: 2072
Joined: Tue Sep 29, 2009 6:09 am

Re: Simple FTP - Failed to retreive directory listing

Post by FTP »

Yes, because you used active mode (PORT mode) in the FTP client, active mode means the client will open a data listener and let server connect, but usually FTP client is behind a firewall/router, so the server connection will be failed.

So please try the passive mode instead, for Filezilla, just choose "Passive" for the option "Site settings -> Transfer settings -> Transfer mode".
Post Reply