After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 534027 - Nautilus does not handle symlinks on an ftp server
Nautilus does not handle symlinks on an ftp server
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: ftp backend
1.2.x
Other All
: Normal normal
: ---
Assigned To: Andreas Henriksson
Nautilus Maintainers
: 535100 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-05-20 11:59 UTC by Kamil Stawirej
Modified: 2010-12-24 23:08 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20


Attachments
symlink dest fullpath fix. (783 bytes, patch)
2009-06-03 12:21 UTC, Andreas Henriksson
committed Details | Review

Description Kamil Stawirej 2008-05-20 11:59:07 UTC
Please describe the problem:
I set up an ftp server locally, added two ftp user accounts with home directory and created a third folder called 'shared' (with proper permissions set), for the two users to exchange files. I then created symlinks to that shared folder so that it could be accessed by both users (from within their home directories). Works just fine when using a standalone ftp client or through firefox, or... windows explorer (yes, win explorer handles the symlinks properly). Unfortunately, when I create a connection to either ftp account through nautilus (Places/Connect to a server...) I can only connect to the user's home directory, the symlink being reported as broken. The only action nautilus offers is to remove that bad symlink (which is not bad at all as it works when using standalone ftp clients).

Steps to reproduce:
1. Open a connection to an ftp server
2. Try to access the directory to which the symlink points
3. Failure...


Actual results:
Nautilus says the symlink is broken, and offers to remove it.

Expected results:
I should be able to access the folder to which the symlink points.

Does this happen every time?
YES

Other information:
Comment 1 A. Walton 2008-05-27 16:13:05 UTC
*** Bug 535100 has been marked as a duplicate of this bug. ***
Comment 2 A. Walton 2008-05-27 16:14:13 UTC
Are you able to navigate around the share using the gvfs-bin utils? (gvfs-ls, gvfs-cat, etc). If not, we should move this to the gvfs-ftp backend.
Comment 3 Alexander Meier 2008-05-27 20:26:49 UTC
(In reply to comment #2)
> Are you able to navigate around the share using the gvfs-bin utils? (gvfs-ls,
> gvfs-cat, etc). If not, we should move this to the gvfs-ftp backend.
> 

I have the same problem and I can navigate around with gvfs-ls and gvfs-cat:
gvfs-mount ftp://www.myserver.at/
gvfs-ls ftp://www.myserver.at/www/
gvfs-cat ftp://www.myserver.at/www/index.php
(www is the symlink)

[Maybe nautilus checks itself wheter a directory with the given name exists]
Comment 4 Alexander Meier 2008-05-27 21:35:12 UTC
A similar problem occurs when you try to access an hidden file or folder. (file which do not appear in the directory-listing but you can still access when you know its name)
It tells you »ftp://localhost/hidden« could not be found (german: konnte nicht gefunden werden) Please check your spelling and try again. (german: Bitte prüfen Sie die Rechtschreibung und versuchen Sie es noch einmal.)

But you can access the hidden files/folders normally by using gvfs-cat:
 alexander@hwi-meier:~$ gvfs-cat ftp://localhost/hidden/hidden.txt
 This is hidden.

Comment 5 Alexander Meier 2008-11-11 12:52:14 UTC
Bug is still present in Version 2.24.1
I think the correct component would be "Navigation".

This bug is similar to: http://bugzilla.gnome.org/show_bug.cgi?id=551822
Comment 6 Alexander Meier 2009-06-03 09:11:39 UTC
In Nautilus 2.26.2 I am able to open hidden direcories, relative symbolic links but not absolute symbolic links.

Example outputs:

alexander:/home/ftp$ ls -al
lrwxrwxrwx 1 root root       8 2009-06-03 10:11 bar -> foo/bar/
drwxr-xr-x 3 root root    4096 2009-06-03 10:11 foo
drwxr-xr-x 2 root hidden  4096 2009-06-03 09:49 .hidden
lrwxrwxrwx 1 root root       9 2009-06-03 10:31 test -> /var/www/
lrwxrwxrwx 1 root root       3 2009-06-03 10:59 test2 -> ../

alexander:ftp$ gvfs-ls ftp://alexander@localhost/home/ftp/ -lh
foo	0	(directory)
test2	0	(directory)
test	9	(symlink)
bar	0	(directory)

With nautilus I can access bar, foo and .hidden, test2 but not test (the symbolic link with an absolute path). With gvfs-utils I can access every symlink/directory.

As Andreas Henriksson fixed the bug with the hidden directories (http://bugzilla.gnome.org/show_bug.cgi?id=520399) I added him to the CC list.












Comment 7 Andreas Henriksson 2009-06-03 10:41:18 UTC
Hello Alexander!

Could you please provide the debug output from gvfsd-ftp when doing your test?
Either directly run /usr/lib/gvfs/gvfsd-ftp host=localhost user=foo password=bar or replace your gvfsd main daemon with /usr/lib/gvfs/gvfsd -r to see the debug output .....
Comment 8 Andreas Henriksson 2009-06-03 10:42:38 UTC
Please also specify which version of gvfs you are using. Thanks! 
Comment 9 Alexander Meier 2009-06-03 11:38:04 UTC
Hello Andreas!

I am using gvfs 1.2.2

When opening the FTP-folder in nautilus I get following debug output (I hope I didn't forget something important):

--> LIST -a
<-- 150 Opening ASCII mode data connection for file list
--- drwxr-xr-x   4 ftp      nogroup      4096 Jun  3 08:59 .
--- drwxr-xr-x   5 root     root         4096 Jun  3 07:37 ..
--- lrwxrwxrwx   1 root     root            8 Jun  3 08:11 bar -> foo/bar/
--- drwxr-xr-x   3 root     root         4096 Jun  3 08:11 foo
--- lrwxrwxrwx   1 root     root            9 Jun  3 08:31 test -> /var/www/
--- lrwxrwxrwx   1 root     root            3 Jun  3 08:59 test2 -> ../
<-- 226 Transfer complete
--> CWD /home/ftp/var
<-- 550 /home/ftp/var: No such file or directory

So it seems the problem is, that it is trying to CWD to the target (var) instead of the link name (test).
Comment 10 Andreas Henriksson 2009-06-03 12:21:21 UTC
Created attachment 135872 [details] [review]
symlink dest fullpath fix.

Fix the handling of symlink with fullpath destinations, rather then a relative destination.

This should fix Alexander Meiers problem. (The original bug report is to vague to know if it's the same issue.)
Comment 11 Cosimo Cecchi 2009-06-03 12:40:37 UTC
-> gvfs
Comment 12 Andreas Henriksson 2009-06-06 07:29:59 UTC
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.

(The patch has been applied to the stable "gnome-2-26" branch and will be part of future 1.2.x releases. The development tree "master" has not been changed since the ftp backend is currently being reorganized in the "ftp-reorg" branch which will hopefully soon be merged into the master branch.... atleast before gvfs 1.4.0 / gnome 2.28.)

Comment 13 Martin Lukeš 2010-12-24 23:08:51 UTC
I'm sad to say that this bug is happening again.
I have Ubuntu Maverick with GNOME Nautilus 2.32.0 and gvfs 1.6.4-0ubuntu1.1

The problem is really in Nautilus since via ftp tool I can cd to symbolic link with no problem. Also gvfs-bin tools works fine.