What is the best-practices way to allow all local users to access sshfs mounts when the mount is established by an arbitrary non-root user? (Access will be according to file permissions, of course.)
Provided that the
allow_other mount option is correctly specified, can any arbitrary user, along with that user's ssh key pair, be specified in /etc/fstab?
I contemplate auto-mounting the sshfs via fstab using something similar to this:
joe@fileserver:/shared/Docs /shared/Docs fuse.sshfs x-systemd.automount,_netdev,user,identityfile=/home/joe/.ssh/id_rsa,allow_other,default_permissions 0 0
I have the "user_allow_other" mount option uncommented in /etc/fuse.conf. Assume the sshfs mount is now working correctly for user "joe".
I want other users (e.g., mary, tim) to have access to /shared/Docs, as determined by standard file permissions.
What is the best practices way to accomplish this with sshfs? What are the caveats I need to be aware of when shifting from nfs to sshfs?
Under nfs the shares were mounted by the root account. With sshfs I cannot use the root account because the fileserver does not allow root to ssh connect.
The fileserver runs Arch Linux. Clients are either Arch or Ubuntu.