Opened 13 years ago

Closed 11 years ago

Last modified 6 years ago

#3153 closed Bug report (fixed)

Remote files treated as directories

Reported by: noof Owned by:
Priority: normal Component: FileZilla Client
Keywords: Cc: noof, Tim Kosse, andyk70, maassg, hlein, jjrosado, devliljohn, bugzilla@…
Component version: Operating system type:
Operating system version:

Description

When connecting to ftp.sunet.se and going into, for example:
/pub/Linux/distributions/ubuntu/ubuntu-cd/feisty/

I get a list of .iso-files listed as directories by FZ. Because of this I cannot download them since it tries to cd into the files. I've attached a log file containing the output from a refresh. It seems to misunderstand the symlinks. Using 3.0b8 on WinXP SP2.

Attachments (1)

fz3log.txt (6.4 KB) - added by noof 13 years ago.
Debug output produced when refreshing a directory with the described problem.

Download all attachments as: .zip

Change History (12)

Changed 13 years ago by noof

Attachment: fz3log.txt added

Debug output produced when refreshing a directory with the described problem.

comment:1 Changed 13 years ago by Tim Kosse

Unfortunately there's no way to distinguish between symlinks to files and symlinks to directories.

comment:2 Changed 13 years ago by noof

The difference between FZ2 and FZ3 is that FZ2 detects that it's a symlink to a file after failing to cd into it and downloads it. FZ3 just says:
Command: CWD ubuntu-7.04-desktop-i386.iso
Response: 550 Can't change directory to ubuntu-7.04-desktop-i386.iso: Not a directory
Error: Failed to retrieve directory listing

And then does nothing. It would be better if FZ3 handled symlinks the same way as FZ2.

comment:3 Changed 12 years ago by andyk70

What about if FZ would try to download it if it fails to cd a symlink?

Not a nice solution, but maybe a workaround for now?

comment:4 Changed 12 years ago by maassg

There are products like "WS FTP Pro" that do distinguish
between symlinks to files and symlinks to directories.
So there seems to be a way.
-
Maybe you can fire an additional "sshexec readlink <filename>" command
to find out.

comment:5 Changed 12 years ago by hlein

Hi,

This is a log how ws_ftp handles this problem (fits to FileZilla's [ 1949579 ] Symbolic links on remote server are not handled correctly). Maybe it helps:

150 Opening ASCII mode data connection for file list
# - 215 Bytes in 0.031 Sekunden übertragen, 53.621 Kbit/s ( 6.703 Kbit/s), Übertragung erfolgreich.
226-Transfer complete.
226 Quotas off
CWD README.txt
550 README.txt: Not a directory
XCWD README.txt
550 README.txt: Not a directory
CWD README.txt
550 README.txt: Not a directory
XCWD README.txt
550 README.txt: Not a directory
CWD /testcase/README.txt
550 /testcase/README.txt: Not a directory
XCWD /testcase/README.txt
550 /testcase/README.txt: Not a directory
PWD
257 "/testcase" is current directory.
CWD README.txt
550 README.txt: Not a directory
XCWD README.txt
550 README.txt: Not a directory
CWD /testcase/README.txt
550 /testcase/README.txt: Not a directory
XCWD /testcase/README.txt
550 /testcase/README.txt: Not a directory
PWD
257 "/testcase" is current directory.
TYPE A
200 Type set to A
PASV
227 Entering Passive Mode (87,106,185,19,138,31).
Verbinden des Datenkanals mit 87.106.185.19:138,31(35359)
Datenkanal verbunden mit 87.106.185.19:138,31(35359)
RETR README.txt
150 Opening ASCII mode data connection for README.txt (1221 bytes)
226 Transfer complete.
# - 1249 Bytes in < 0.001 Sekunden übertragen, 9757.813 Kbit/s ( 1219.727 Kbit/s), Übertragung erfolgreich.
Fertig: Beendet
QUIT
221 Goodbye.

Regards

comment:6 Changed 11 years ago by jjrosado

I have the same issue with the php.ini file as Symlink. FZ3 view the php.ini files as a directory.

comment:7 Changed 11 years ago by devliljohn

i agree have it try to cd into them and if it fails then try to retrieve them.

comment:8 Changed 11 years ago by Tim Kosse

Component: OtherFileZilla Client

comment:9 Changed 11 years ago by Tim Kosse

Resolution: fixed
Status: newclosed

Will be fixed in the next version.

comment:10 Changed 11 years ago by Jez McKean

Cc: bugzilla@… added
Resolution: fixed
Status: closedreopened

This is not fixed, and is still a problem.

There is some mention that it's difficult to determine whether a file is a symlink.
In my experience they are all very small files, a few dozen bytes, and viewed as text start with "link:", could these facts be used?

comment:11 Changed 11 years ago by Tim Kosse

Resolution: fixed
Status: reopenedclosed

It is not possible to distinguish between links to files and links to directories without actually trying to access them first.

That is why all links are displayed as directories first and when you try to access it and it turns out it is a link to a file, it gets downloaded.

Note: See TracTickets for help on using tickets.