GNOME Bugzilla – Bug 560357
gvfsd-ftp cannot handle relative paths, if initial directory is not "/"
Last modified: 2018-09-21 16:30:27 UTC
Please describe the problem: Some FTP servers have different initial directories for each account. Check it with: > ftp <site_ip> Name: username Password: **** ftp> pwd 257 "/username" is current directory. If this initial directory is not "/" then gvfsd-ftp has problems! Steps to reproduce: 1. Hit CTRL-L in a Nautilus window 2. Enter URL ftp://<site_ip>/ of a site with init_dir other than "/" 3. Retry with ftp://<site_ip>/<init_dir>/ 4. Retry with ftp://<site_ip>/<init_dir>/<valid_subdir>/ Actual results: With 2. an empty Nautilus windows is shown - no error dialog. Debug output (gvfsd -r) shows that gvfsd-ftp connects, then sends 'CWD /' followed by 'LIST' which in my case returns an empty list. With 3. it does the same like 2. (definitely wrong!) With 4. it works! But this "manually fixed" URL cannot be copy-pasted to other ftp clients like Firefox or Kompozer. They use paths relative to the initial directory. Expected results: I expect Nautilus to treat any given path relative to the initial directory of the server. This is what Firefox or Kompozer do. Does this happen every time? Yes. Other information: Command line clients like ftp or lftp change into initial directory after login. So further CWD commands are treated relative to this initial directory. Only if a path begins with "/" then it's treated as absolute. But URL-based FTP clients like Firefox or Nautilus cannot use absolute paths beginning with "/" (multiple "/" in an URL are treated like a single one ;-). IMHO this is why they must treat any paths as relative.
*** Bug 556809 has been marked as a duplicate of this bug. ***
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gvfs/issues/71.