Topic "Bug in FTP protocol prevents changing directory"

Author Message
shadowlmd
[View user's profile]

Joined: 2012-01-13
Posts: 8
Location: St.Petersburg, Russia
WinSCP in FTP mode fails to enter symlinked directories on some FTP servers. I am using SwiFTP on my android device and all FTP software except WinSCP works well with it. I made a debug log which clearly shows a bug in change directory code:
Code:

. 2012-01-13 02:57:39.004 Changing directory to "sdcard".
> 2012-01-13 02:57:39.004 CWD sdcard
< 2012-01-13 02:57:39.051 250 CWD successful
. 2012-01-13 02:57:39.051 Got reply 1 to the command 16
. 2012-01-13 02:57:39.051 Getting current directory name.
> 2012-01-13 02:57:39.051 PWD
< 2012-01-13 02:57:39.057 257 "mnt/sdcard"
. 2012-01-13 02:57:39.057 Got reply 1 to the command 16
. 2012-01-13 02:57:39.057 Retrieving directory listing...
> 2012-01-13 02:57:39.057 CWD /mnt/sdcard/mnt/sdcard/
< 2012-01-13 02:57:39.064 550 Can't CWD to invalid directory
. 2012-01-13 02:57:39.064 Could not retrieve directory listing
. 2012-01-13 02:57:39.065 Got reply 4 to the command 2
* 2012-01-13 02:57:39.079 (ECommand) Error listing directory 'mnt/sdcard'.
* 2012-01-13 02:57:39.079 Could not retrieve directory listing
* 2012-01-13 02:57:39.079 Can't CWD to invalid directory


I attached full log file as well.
winscplog.txt (8.15 KB) [Download]

Description: (none)

Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
Can you email me a complete log file, showing both entering regular subfolder and symlink?
_________________
Martin Prikryl
shadowlmd
[View user's profile]

Joined: 2012-01-13
Posts: 8
Location: St.Petersburg, Russia
prikryl wrote:
Can you email me a complete log file, showing both entering regular subfolder and symlink?

After experimenting with different FTP servers I figured out it was not a problem with symlinks at all. Log above shows that after getting "/mnt/sdcard" as current directory, WinSCP tries to change directory to "/mnt/sdcard/mnt/sdcard" which of course doesn't exist. Same happens when it tries to enter regular directories (see new log, /system is a regular directory). That's probably something specific to SwiFTP server, because other FTP servers for Android work fine with WinSCP (apart from that one in my other bug report), but still all other FTP clients work perfectly with SwiFTP server.

Anyway, while I was making a full log as requested, after few directory changes WinSCP interface became unresponsive. I waited few minutes before closing window, no new entries were written to log file.
winscplog.txt (14.51 KB) [Download]

Description: (none)

martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
I have sent you an email with a debug version of WinSCP to address you have used to register on this forum.
shadowlmd
[View user's profile]

Joined: 2012-01-13
Posts: 8
Location: St.Petersburg, Russia
Trace attached.
WinSCP0938trace.log.chdir.fail.zip (79.24 KB) [Download]

Description: (none)

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