Closed Bug 299875 Opened 19 years ago Closed 9 years ago

Unable to navigate directories on some FTP servers.

Categories

(Core Graveyard :: Networking: FTP, defect)

x86
Windows 2000
defect
Not set
major

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: caiparinha, Unassigned)

References

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4

After logging on to an FTP site, the top level directory structure is displayed.
 Whn attempting to navigate into a subdirectory, I get an error "425-Download
Failed".  I have seen this error when logged into a system running GuildFTPd as
well as the native FTP server on our HP-UX unix systems.  It seems that Firefox
is unable to diferentiate between files and folders on some FTP servers.  When
trying to navigate to the directory /pub on an FTP site running GuildFTPd, I
have noticed that Firefox tries to open the link ftp://ftpsite/pub and attempts
to download the file "pub".  If I type the link manually as ftp://ftpsite/pub/
including the last slash, then firefox will open the folder and display the
files correctly.  I have no problem navigating the directories on the same FTP
servers with either Internet Explorer, FireFTP, or WSFTPLe.  

Reproducible: Always

Steps to Reproduce:
1. Log onto a ftp server running GuildFTPd
2. Attempt to navigate into a subdirectory
3. 

Actual Results:  
Error 425-Download 

Expected Results:  
A listing of that folder

It appears that firefox knows the difference between files and directories
because both are shown with their correct icons.  I appears that when trying to
open a subdirectory, it attemts to download it instead of cd'ing into it and
listing it.  It's unfortunate that I am forced to use IE for the time being as
it seems to work just fine.
*** Bug 299894 has been marked as a duplicate of this bug. ***
I came across the same problem with Firefox 1.5.0.3, and it seems it is a 'trailing slash problem'.

By default, IE seems to add a closing "/" to the subdirectory ftp address, while FF doesn't.

Intriguingly, in FF access is denied without the closing "/", but it works if I add the closing "/" manually. 
mass reassigning to nobody.
Assignee: dougt → nobody
This is not exactly a trailing slash problem - the trailing slash just makes sure Firefox knows it's a directory, and therefore properly uses the CWD command to switch to it.

The problem is that even though Firefox knows that a particular file is actually a directory, it still attempts to do a RETR (download file) instead of a CWD; Most FTP servers immediately refuse this on the grounds that it is actually a directory, but GuildFTPd does not. When an FTP server immediately refuses, Firefox uses CWD instead. When, instead, GuildFTPd actually attempts to upload the file (and immediately reports an error), Firefox just dumps the error to the user and stops there.
This I found out by using Wireshark to examine the traffic.

Oddly, the FTP RFC doesn't seem to mention what to do if a client erroneously attempts to download a file, so GuildFTPd claims they are following the RFC (which may very well be true - I haven't read the whole thing top to bottom, I was just looking for an example of this behaviour and didn't find any).
only ftp critical fixes now
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.