Mount remote samba with sftp:// permissions and group membership

0

If I mount as remote samba (running on Linux) with Nautilus (sftp://) with a username and password will the permissions work as if I were on the remote system regardless of the local user name and the groups the user is part of ?

Dragos

Posted 2010-05-06T09:58:27.473

Reputation: 1 189

1You sound confused. SMB and SFTP are two separate protocols. Which do you actually mean? – Ignacio Vazquez-Abrams – 2010-05-06T10:03:49.567

Answers

2

Samba is the Linux subsystem that handles Windows Networking (SMB/CIFS). SFTP is the SSH version of FTP.

Nautilus mounts both via GVFS. The permissions you'd have on the remote filesystem will depend on how the remote system is configured, and what remote user you use to authenticate to the remote system.

Unless your local system and the remote server get their users and group memberships from some centralized directory service (LDAP or the like), the permissions you get on the remote connection will likely be different than the permissions you have on the local system.

Further, the Samba subsystem can provide another set of permissions, and is not necessarily configured to synchronize those with the system user. In contrast, the SFTP permissions you get will be those of the remote user you're authenticating as when logging into the remote server.

quack quixote

Posted 2010-05-06T09:58:27.473

Reputation: 37 382

Thanks, great explanation. I was using mount.cifs until now but since I don't have users synchronized between these 2 systems I found the sftp from nautilus better and easier. The only problem that I still have is how to browse the sftp:// mount on the local system since the ~/.gvfs is empty.

Thank you – Dragos – 2010-05-06T12:21:47.873

@dragos: ooo, they took ~/.gvfs mounts away?? there's probably a config option to bring that back, but i don't know it offhand. – quack quixote – 2010-05-06T13:14:55.387

Can you please have a look on that ? Or whom I can talk to about bringing the ~/.gvfs back. I read that in recent Gnome the gvfs does not exist on the disk anymore. – Dragos – 2010-05-07T06:58:38.630

@dragos: actually, it works for me in Nautilus in Ubuntu 10.04 with both Samba and SFTP connections. i connected to the server via the Places > Connect to Server menu, and both mounts showed up under ~/.gvfs -- "~/.gvfs/share on server" for Samba, and "~/.gvfs/sftp for user on server" for SFTP. this was on a new user with default Gnome config, so either your procedure is different or your config is different (or i'm making assumptions about your software versions that just aren't true). – quack quixote – 2010-05-07T08:07:10.473

Under Ubuntu Server 8.04 with gnome-core applied from 8.04 repositories it does not work. It seems that its a buggy Gnome/Nautilus version or they simply decided to not write it on disk with that version. – Dragos – 2010-05-07T12:39:14.363

@dragos: ah. that's the problem. i don't think Gnome used GVFS in Ubuntu 8.04 -- i think it used gnome-mount. my bad; i assumed you were using the new version that just came out. you should update your question with that info. Gnome/Nautilus/GVFS/Ubuntu have changed a lot since then. – quack quixote – 2010-05-07T22:11:41.920

Thanks, I think I should upgrade Gnome then. But there seems to be a little omission too. When you browse the remote mount inside the ~/.gvfs and see the properties of a file the gid is correct but numeric it does not resolve to its name. Any insight on that ? – Dragos – 2010-05-10T08:23:08.880