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 773766 - nautilus "jails" user to his homedir on a remote system
nautilus "jails" user to his homedir on a remote system
Status: RESOLVED DUPLICATE of bug 697461
Product: nautilus
Classification: Core
Component: general
3.22.x
Other Linux
: Normal minor
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-10-31 23:47 UTC by Stefan Jensen
Modified: 2019-12-19 13:49 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Stefan Jensen 2016-10-31 23:47:00 UTC
I connect with nautilus to a remote host via "sftp://user@host/".

On the first connect, I can start browsing the remote file system starting at "/".
However, as soon I click on the "Mount-Symbol" in the Side panel or close the window and reopen it, nautilus changed directory to my remote home dir and there is visible way available to browse back to "/" or any file or directory higher that the home dir.

The remote server has no restrictions or "ChrootDirectory" configured.

GNOME nautilus 3.22.1

I filed it under "general" because i'm not sure if this is code bug or a design issue.
Comment 1 Stefan Jensen 2016-10-31 23:51:35 UTC
Gnah, correction:

"There is _NO_ visible way available to browse back to "/" or any file or directory higher that the home dir."

Sorry for the fuzz, it's pretty late here.
Comment 2 Carlos Soriano 2016-11-01 09:20:46 UTC
I don't understand, what is the "home dir" special about in the remote server?
We connect, afaik, to the address you provided, not something else like your "home" directory in the remote.
Afaik we don't have notion about any home directory in a remote.
Comment 3 Ondrej Holy 2016-11-01 09:57:45 UTC
Carlos, see:
https://developer.gnome.org/gio/stable/GMount.html#g-mount-get-default-location

GVfs suggests home dir as a default location for e.g. sftp shares, but it differs from g_mount_get_root...
Comment 4 Ondrej Holy 2016-11-01 09:59:12 UTC
It is true that it is hard to access root folder over UI for such shares...
Comment 5 Ondrej Holy 2016-11-01 10:01:15 UTC
Try: 
1/ sudo service sshd start
2/ connect to sftp://localhost/
3/ nautilus shows your home dir
Comment 6 Carlos Soriano 2016-11-01 16:59:05 UTC
Ooh I see, thanks Ondrej for the clarification. 
Why should we connect to the default one instead of the address the user typed (which is most probably the root) then?
Comment 7 Ondrej Holy 2016-11-02 08:17:51 UTC
It is same as "ssh localhost". It connects to your device and sets pwd to your homedir, but you can also change it to root. ssh doesn't allow specify path when connecting. 

User wants usually see the home directory in most cases, because it is place, where he has its files and has full permissions for them...
Comment 8 Carlos Soriano 2016-11-02 13:53:08 UTC
okay... that sounds like something we don't take care about from Nautilus UI pov. On the other hand I don't have a good solution for this either.
Comment 9 Priit Laes (IRC: plaes) 2016-11-27 11:08:28 UTC
(In reply to Carlos Soriano from comment #8)
> okay... that sounds like something we don't take care about from Nautilus UI
> pov. On the other hand I don't have a good solution for this either.

This issue actually breaks following workflow:

1. On remote server you have external drive mounted to /mnt.
2. gvfs-mount ssh://server/mnt (or via nautilus "Connect to Server" input box under "Other Locations"
3. Select file on remote under /mnt and copy (for later pasting)
4. You navigate to you home directory and select "paste"
5. You end up with 0 byte file
Comment 10 Ondrej Holy 2016-11-28 08:25:34 UTC
This is probably an unrelated bug in GVfs. It might be a permission issue, however, in such case, it should return an error instead of the empty file. Does "gvfs-copy ssh://server/mnt/file ssh://server/home/user/file" work? Does "scp user@server:/mnt/file user@server:/home/user/file" work? Please file a new bug for "gvfs" product and "sftp backend" component if needed...
Comment 11 Priit Laes (IRC: plaes) 2016-11-28 08:49:27 UTC
Oops, was a bit unclear at point 4:

> This issue actually breaks following workflow:
> 
> 1. On remote server you have external drive mounted to /mnt.
> 2. gvfs-mount ssh://server/mnt (or via nautilus "Connect to Server" input
> box under "Other Locations"
> 3. Select file on remote under /mnt and copy (for later pasting)
> 4. You navigate to you home directory and select "paste"

Navigate to your local home directory, select paste in Nautilus,

> 5. You end up with 0 byte file



Command line usage of gvfs-copy works fine:

gvfs-copy ssh://server/mnt/file ./
Comment 12 Ondrej Holy 2019-12-19 13:49:29 UTC

*** This bug has been marked as a duplicate of bug 697461 ***