Topic ""LIST -a" causes host to unexpectedly terminate connection"

Author Message
den4b
[View user's profile]
Donor
Joined: 2010-04-28
Posts: 3
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.

Code:
. 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'.
Advertisements
den4b
[View user's profile]
Donor
Joined: 2010-04-28
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?

Quote:
https://www.smartftp.com/support/kb/mlst-mlsd-f179.html

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, RaidenFTPd 2.4 build 800+, gene6 3.x

RFC: https://tools.ietf.org/html/draft-ietf-ftpext-mlst-16
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24991
Location: Prague, Czechia
Thanks for your post. This request has been added to tracker.
_________________
Martin Prikryl
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24991
Location: Prague, Czechia
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.
_________________
Martin Prikryl
den4b
[View user's profile]
Donor
Joined: 2010-04-28
Posts: 3
prikryl wrote:
WinSCP does not rely on it, it reverts to "LIST" if "LIST -a" fails. But your host just disconnects. WinSCP cannot cope with that.

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.
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
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24991
Location: Prague, Czechia
russ_gillespie wrote:
can I get WinSCP to use something other than this?

Please read documentation. If that does not help, come back.
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License