You are not logged in.
Hello,
I try to (auto) mount a directory from my universities server using sshfs.
me@server:/scratch /mnt/home fuse.sshfs noauto,x-systemd.automount,_netdev,users,idmap=user,IdentityFile=/home/florian/.ssh/id_rsa,allow_other,reconnect 0 0
in the fstab works, but the permissions are somewhat off. All files that are created by my user have uid=0 on my system, because the root user does the automount. What is the best way to do an systemd automount and use another user for the mount operation? As far as I know systemd --user does not allow user mounts (even if it's fuse only).
I tried to use the idmap option:
fstab:
me@server:/scratch /mnt/home fuse.sshfs noauto,x-systemd.automount,_netdev,users,idmap=file,uidfile=/etc/ipvs.uidmap,IdentityFile=/home/florian/.ssh/id_rsa,allow_other,reconnect 0 0
# cat /etc/ipvs.uidmap
florian:20337
but no trying to mount produces no results at all. "mount -v /mnt/home" just produces a return code of 1, the same if I use the fstab entry on the command line.
If I enable the automounter it goes like that upon entering the directory:
Apr 17 12:55:22 asaru systemd[1]: Got automount request for /mnt/sgs, triggered by 18347 (ls)
Apr 17 12:55:22 asaru systemd[1]: Mounting /mnt/sgs...
Apr 17 12:55:22 asaru systemd[1]: Mounted /mnt/sgs.
Apr 17 12:55:23 asaru systemd[1]: mnt-sgs.mount mount process exited, code=exited status=1
Apr 17 12:55:23 asaru systemd[1]: Unit mnt-sgs.mount entered failed state.
# ls sgs
ls: cannot open directory sgs: No such device
(mnt/home is /mnt/sgs, please don't care)
Anyone any idea what could be wrong there?
Thanks a lot!
Offline
Maybe add uid=florian and gid=florian. And if that does not work maybe force an umask with umask=755.
fs/super.c : "Self-destruct in 5 seconds. Have a nice day...\n",
Offline