"LIST -a" causes host to unexpectedly terminate connection

Advertisement

den4b
Donor
Joined:
Posts:
3

"LIST -a" causes host to unexpectedly terminate connection

WinSCP used to work fine for ages with my FTP host and then suddenly stopped working. I was almost ready to abandon WinSCP in favor of FileZilla (which was working fine with my host).

It took me several days to figure out that my FTP host does not understand (or stopped understanding) the LIST -a command and unexpectedly terminates the connection. Below is a snippet of the log file.

Just as a suggestion, maybe it will be better to disable LIST -a by default. It is not safe to rely on this feature to work on all hosts. I think most of the users will not dig as far as I did and will put it down as a bug in your application.

WinSCP Version 4.2.7, Protocol FTP Passive, Windows XP SP3.
. 2010-04-27 12:42:44.281 Changing directory to "/xxxxx".
> 2010-04-27 12:42:44.281 CWD /xxxxx
< 2010-04-27 12:42:44.296 250 CWD command successful
. 2010-04-27 12:42:44.296 Got reply 1 to the command 16
. 2010-04-27 12:42:44.296 Getting current directory name.
> 2010-04-27 12:42:44.296 PWD
< 2010-04-27 12:42:44.312 257 "/xxxxx" is the current directory
. 2010-04-27 12:42:44.312 Got reply 1 to the command 16
. 2010-04-27 12:42:44.312 Retrieving directory listing...
> 2010-04-27 12:42:44.312 TYPE A
< 2010-04-27 12:42:44.328 200 Type set to A
> 2010-04-27 12:42:44.328 PASV
< 2010-04-27 12:42:44.328 227 Entered Passive Mode (xx,xx,xx,xx,xx,xx)
> 2010-04-27 12:42:44.328 LIST -a
< 2010-04-27 12:42:44.359 150 Opening ASCII mode data connection for file list
. 2010-04-27 12:42:44.375 Disconnected from server
. 2010-04-27 12:42:44.375 Could not retrieve directory listing
. 2010-04-27 12:42:44.375 Got reply 1004 to the command 2
. 2010-04-27 12:42:44.375 Timeout detected.
. 2010-04-27 12:42:44.375 Ignoring old TransferEnd message
* 2010-04-27 12:42:44.375 (ESshFatal) Lost connection.
* 2010-04-27 12:42:44.375 Disconnected from server
* 2010-04-27 12:42:44.375 Could not retrieve directory listing
* 2010-04-27 12:42:44.375 Timeout detected.
* 2010-04-27 12:42:44.375 Opening ASCII mode data connection for file list
* 2010-04-27 12:42:44.375 Error listing directory '/xxxxx'.

Reply with quote

Advertisement

den4b
Donor
Joined:
Posts:
3

I noticed that FileZilla uses MLSD command to get directory listing. It shows hidden files as well, while WinSCP no longer shows hidden files with LIST command. Will it be possible to use MLSD automatically when it is supported or at least being able to choose it manually?
https://www.smartftp.com/en-us/support/kb/179:
MLST and MLSD are FTP commands intended to provide detailed, standardized directory listings across different server platforms.

FTP Server Software with MLST/MLSD Support:
NetBSD-ftp, NcFTPD, Titan Server / Visinetic, SurgeFTP, Globalscape Secure FTP Server, PureFTPd, WFTPD

RFC: https://datatracker.ietf.org/doc/rfc3659/

Reply with quote

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

Re: "LIST -a" causes host to unexpectedly terminate connection

den4b wrote:

Just as a suggestion, maybe it will be better to disable LIST -a by default. It is not safe to rely on this feature to work on all hosts. I think most of the users will not dig as far as I did and will put it down as a bug in your application.
WinSCP does not rely on it, it reverts to LIST if LIST -a fails. But your host just disconnects. WinSCP cannot cope with that.

Reply with quote

den4b
Donor
Joined:
Posts:
3

Re: "LIST -a" causes host to unexpectedly terminate connection

@martin: That's exactly why I think LIST -a should not be used by default, since it can make hosts disconnect unexpectedly without giving WinSCP a chance to revert back to LIST. Anyway, it is your call.

I really hope you will be able to add support for MLSD. Thanks for adding it as an enhancement request.

Reply with quote

Advertisement

russ_gillespie
Guest

I'm having exactly the same issue. My FTP server times out at the LIST -a command, can I get WinSCP to use something other than this?

Thanks,
Russ

Reply with quote

Advertisement

You can post new topics in this forum