Closed Bug 248611 Opened 20 years ago Closed 15 years ago

SFTP protocol displays symlink to dir as file

Categories

(Core :: Networking, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.2a1

People

(Reporter: greenrd, Assigned: michal)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040622
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040622

The sftp: protocol displays a symbolic link to a directory as if it were an
ordinary file (with size 1K??)

Reproducible: Always
Steps to Reproduce:
1. mkdir foo
2. ln -s foo bar
3. visit parent directory via sftp: protocol in mozilla

Actual Results:  
bar displays as file, not directory

Expected Results:  
bar should display as a symbolic link. Otherwise it looks like you can't
traverse into it to see more files, which is incorrect.
dup of bug 24389?
No, not a dupe - I propose that it should display *as a symbolic link*, not *as
a file of size 1K*, which is INCORRECT and will confuse people.
I totally agree that it's a bug, should be fixed, and that the current behaviour
is incorrect and confusing.

But bug 24389 does not propose to display symlinks as "as a file of size 1K".
It suggests that symlinks to directories should display as "only clickable or
with an expand arrow", so it can be visually determined whether something on the
ftp server "points to a file or a directory".

That seems to desdcribe the same problem as in this bugreport here.
And therefore this looks like a duplicate.

Unless it only affects sftp and not ftp?  sftp is not explicitly mentioned in
bug 24389.
OK. I don't know if this affects FTP as well. My point was, I understand and
accept that they've marked that bug WONTFIX because it requests following the
link, which they think is too expensive when there are a lot of links.

I'm not asking for the link to be followed - just for it to be displayed in a
distinguished way to make it clear that it's a link, so it's a different
bug/request. I don't want this bug to be marked a duplicate of a WONTFIX,
because it isn't the same request!
related: bug 133835
Keywords: helpwanted
Target Milestone: --- → Future
Assignee: darin → nobody
QA Contact: benc → networking
Target Milestone: Future → ---
Assignee: nobody → michal
Symlinks pointing to directories are now correctly detected as directories.
Attachment #363866 - Flags: review?(cbiesinger)
Comment on attachment 363866 [details] [diff] [review]
patch v1
[Checkin: Comment 10]

The bug was about how this is displayed in the directory list, right? This patch does not affect that.
Attachment #363866 - Flags: review?(cbiesinger) → review+
Comment on attachment 363866 [details] [diff] [review]
patch v1
[Checkin: Comment 10]

Though the code looks to me like the directory listings should handle this correctly, and it does seem to work for me, so r=biesi
(In reply to comment #7)

The complain was that you can't traverse into it to see more files. And since
FTP displays symlinks also as links I decided to implement it this way. Of
course I can change it if you want.
Comment on attachment 363866 [details] [diff] [review]
patch v1
[Checkin: Comment 10]


http://hg.mozilla.org/mozilla-central/rev/0241ddee0702
Attachment #363866 - Attachment description: patch v1 → patch v1 [Checkin: Comment 10]
Status: NEW → RESOLVED
Closed: 15 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2a1
(In reply to comment #9)
> The complain was that you can't traverse into it to see more files.

But comment 0 said "bar should display as a symbolic link" and comment 4 said:
"I'm not asking for the link to be followed - just for it to be displayed in a
distinguished way to make it clear that it's a link"
(In reply to comment #11)

So if I understand correctly, you meant that this bug should be resolved as WORKSFORME and the problem about following the symlink should be fixed in another bug, right?
Basically yes, though at this point it doesn't really matter. Even better would be, though, to figure out why the original reporter was seeing what he described.
(In reply to comment #13)
> Even better would be, though, to figure out why the original reporter was
> seeing what he described.

I tried to reproduce it with trunk and 0.9 from 20040622 and sftp didn't work at all with these versions. First it displayed error message that sftp is not a registered protocol. By trial and error I found first working version (2006-08-08-04-trunk) and cvs diff pointed me to bug 268314. Then I realized that "empty" liblinc.so.1 is enough to satisfy dynamic linker. With this hack is the first working version 2004-07-03-08-trunk. 2004-07-02-08-trunk and older show empty page instead of directory listing but I couldn't find out the reason. Anyway all working versions I've tested show symlink as link and not 1Kb file. I'm not sure if it's worth to install some ancient linux distro to investigate it more.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: