You are not logged in.
I'm using SSHFS to mount a local server. I don't recall having this problem before; however, my local user can't copy files after the directory is mounted. Reading the Wiki page, it is suggested this line be added to `fstab`:
USERNAME@HOSTNAME_OR_IP:/REMOTE/DIRECTORY /LOCAL/MOUNTPOINT fuse.sshfs noauto,x-systemd.automount,_netdev,user,idmap=user,transform_symlinks,identityfile=/home/USERNAME/.ssh/id_rsa,allow_other,default_permissions,uid=USER_ID_N,gid=USER_GID_N 0 0
Which translates to this line in my /etc/fstab file:
xtain@mrwizard.local:/ /mnt/mrwizard.local fuse.sshfs noauto,x-systemd.automount,_netdev,user,idmap=user,transform_symlinks,identityfile=/home/mastershake/xtian/.ssh/id_rsa,allow_other,default_permissions,uid=1000,gid=1000 0 0
The command `$ sudo mount -a` is not mounting the volume. I can mount using the manual command `$sshfs xtian@mrwizard.local:/ /mnt/mrwizard.local`
The problem can be seen in the listing of the files owned by the user xtian:
[...]
-rw------- 1 500 500 238 May 14 11:33 .Xauthority
Other than the problem of the mount command not working with fstab, Which UID, GID should be used in the fstab line? My local or remote ID for the same user?
----
ALSO, I just noticed this example at the bottom of the WIKI:
"Considering the following example settings ...
SERVER = Server host name (serv)
USER_S = Server user name (pete)
USER_C = Client user name (pete)
USER_S_ID = Server user ID (1004)
USER_C_ID = Client user ID (1000)
GROUP_C_ID = Client user's group ID (100)this is the final SSHFS mount row in /etc/fstab;
pete@serv:/mnt/on/server /nmt/on/client fuse.sshfs x-systemd.automount,_netdev,user,idmap=user,transform_symlinks,identityfile=/home/pete/.ssh/id_rsa,allow_other,default_permissions,uid=1004,gid=1000,umask=0 0 0
As you can see, the uid is set to the server's UID id (1004), and gid is set to... the client's UID (1000), and not (100) or whatever the server's user's GID is... %-/
Last edited by xtian (2015-05-14 17:33:34)
Offline
I have noticed that sshfs will recognize the server's user, and use the server user's permissions, and won't change ownership of files transferred to the server's files.
I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.
Offline
How's that?
USER_S = Server user name (pete)
USER_C = Client user name (bob) <--
?
The strange problem here is I'm logging in as xtian from xtian to xtian, but the server's files show up as UID/GID 500
Last edited by xtian (2015-05-14 23:34:27)
Offline
Not a Sysadmin issue, moving to NC...
Offline
You create a pipe in which the user who mounts the sshfs has the credentials of the user they are logging into via ssh. I'd be about the same as mounting a samba share.
I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.
Offline
@nomorewindows
A CLI pipe? I don't follow your meaning.
Offline
It basically acts as a secure shell, and handles the permissions according to the server you are logging into to. It doesn't try to match up the uids between the machines. Anyone can mount the secure fs, and it "pipes" between who mounted the fs, and who's authentication applies on the other machine. Another user can't tap the secure mounted fs, not even root (if root wasn't the mounter).
I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.
Offline
I can mount using the manual command `$sshfs xtian@mrwizard.local:/ /mnt/mrwizard.local`
According to the above your username is xtian, which it isn't in your fstab entry:
xtain@mrwizard.local:/ /mnt/mrwizard.local ...
So without having looked for further errors nor knowing anything about sshfs, I would suppose to change this.
Sometimes simple spelling errors are actually the hardest to solve. – Like I always try to '#include <some_library.c>'.
Offline