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 551822 - can not access non-listed (hidden) ftp directory
can not access non-listed (hidden) ftp directory
Status: RESOLVED DUPLICATE of bug 520399
Product: gvfs
Classification: Core
Component: ftp backend
0.2.x
Other All
: Normal normal
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2008-09-11 14:14 UTC by Tormod Volden
Modified: 2009-01-22 14:14 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
Use LIST -a instead of LIST on UNIX ftp sites. (345 bytes, patch)
2008-10-07 20:29 UTC, Andreas Henriksson
committed Details | Review

Description Tormod Volden 2008-09-11 14:14:22 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
Comment 1 Andreas Henriksson 2008-10-07 20:14:02 UTC
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.
Comment 2 Andreas Henriksson 2008-10-07 20:29:24 UTC
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.)
Comment 3 Tormod Volden 2008-10-08 09:01:29 UTC
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 :(
Comment 4 Andreas Henriksson 2008-10-08 09:31:42 UTC
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.
Comment 5 Alexander Larsson 2008-10-28 15:24:16 UTC
The LIST -a patch looks ok to commit to trunk at least.
Comment 6 Cosimo Cecchi 2008-10-28 16:57:25 UTC
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).
Comment 7 Alexander Meier 2008-11-11 12:52:39 UTC
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
Comment 8 Tormod Volden 2008-11-11 14:52:35 UTC
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 :)
Comment 9 Tormod Volden 2008-11-11 14:57:19 UTC
I can confirm that I can list the hidden direcory with: gvfs-ls ftp://user@server/outgoing/subfolder/
Comment 10 Andreas Henriksson 2009-01-22 14:14:59 UTC
(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 ***