GNOME Bugzilla – Bug 551822
can not access non-listed (hidden) ftp directory
Last modified: 2009-01-22 14:14:59 UTC
Please describe the problem: I have an URL of the form: ftp://user@server/outgoing/subfolder/ I can use the URL in Firefox and it works fine. However nautilus fails with: Couldn't find "ftp://user@server/outgoing/subfolder/" Please check the spelling and try again. Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information: Reported in Ubuntu: https://bugs.launchpad.net/bugs/262247 The outgoing directory does not lists it contents, which might trigger this regression, but I am not sure. I can browse the root and see the seemingly empty incoming folder but typing in the full URL doesn't help. ProblemType: Bug Architecture: i386 Date: Thu Aug 28 14:48:26 2008 DistroRelease: Ubuntu 8.04 ExecutablePath: /usr/bin/nautilus Package: nautilus 1:2.22.3-0ubuntu2 PackageArchitecture: i386 ProcEnviron: PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games LANG=en_US.UTF-8 SHELL=/bin/bash SourcePackage: nautilus Uname: Linux 2.6.24-19-generic i686
The problem seem to be that either nautilus or gvfs decides on the client side if it's even worth sending the CWD command to the server. Removing the read permissions on a directory (leaving access / x) like reported above is one way to trigger this. Another way to hit this problem is to connect to a ftp server, like default configured vsftpd, which does not list dot-files unless the LIST has an -a argument. Trying to enter a non-listed ".test/" directory through entering it in the location bar will not work, because nautilus thinks it doesn't exist. Simply hacking gvfsbackendftp.c to send "LIST -a" instead of "LIST" and it works.
Created attachment 120158 [details] [review] Use LIST -a instead of LIST on UNIX ftp sites. If the ftp site said it's a UNIX site, then send LIST with -a argument to make sure we get as many files listed as possible. (Hiding dot-files will be handled on the client side.) (A complete fix would of course be to actually check with the server before reporting that a file/directory doesn't exist, but this is still nice to have anyway so that "show hidden files" actually does anything - and while we don't have the complete fix works around part of the problem.)
Thanks Andreas, I tried your patch but (as can be expected, since your patch only deals with dot-files AFAICS) it doesn't help in my case. What would be logic to me, is that when I specify an initial "Folder" in the "Connect to Server..." dialog, it should just CWD to it with no question asked (no iterating through parent directories etc). Is there an ugly hack I can apply for myself and my colleagues? It sucks to not have convenient access to our server for half a year :(
I'm sorry, my problem isn't the exact same as yours and I don't know how to fix it completely. I'll try to dig into it when I have spare time, but don't hold your breath because I'm not making any promises (right now I don't even know if it's a nautilus or gvfs design issue or just the gvfsd-ftp backend being stupid). My problem seemed similar to yours so I reused your bugreport, because I didn't spot bug #528347 until now - which is about my issue.
The LIST -a patch looks ok to commit to trunk at least.
Committed the patch to trunk. Andreas: can we close this bug or is there any remaining fix to do, in order to handle this case completely? 2008-10-28 Cosimo Cecchi <cosimoc@gnome.org> * daemon/gvfsbackendftp.c: (dir_default_init_data): Use LIST -a instead of LIST on UNIX ftp sites. Patch by Andreas Henriksson (#551822).
I also have the problem from the Bug Report, but it is not a bug in gvfs but in Nautilus because I can access the hidden directory with gvfs-bin utils. See this similar bug: http://bugzilla.gnome.org/show_bug.cgi?id=534027
Cosimo, the commit does not fix this bug, but a related case which Andreas pointed out. Or a sub-case, depending on how you see it :)
I can confirm that I can list the hidden direcory with: gvfs-ls ftp://user@server/outgoing/subfolder/
(In reply to comment #9) > I can confirm that I can list the hidden direcory with: gvfs-ls > ftp://user@server/outgoing/subfolder/ > That confirms the issue being related to how nautilus interacts with gvfs and is described in another bug already. I'm merging the two reports for a better overview of work needed. Thanks for the bug report. *** This bug has been marked as a duplicate of 520399 ***