[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: sshfs has fubared mount



On Tue 09 Feb 2021 at 00:01:03 (-0500), Gene Heskett wrote:
> I have sshfs setup so I can move files around between this box and 4 
> others, 3 of which are now running buster.  Works only for the user, me.
> 
> Same install medium, a usb key, has installed buster to a 5th machine, 
> which is identical to two of the other 4.
> 
> But the mount permissions are inverted, only root can mount this 5th 
> machine.  ssh -Y aliasname works normally, and I am logged into this 5th 
> machine fron a konsole as me, user 1000.
> 
> Only I can execute these 4 lines of a script in my bin directory
> #!/bin/bash
> sshfs gene@sixty40.coyote.den:/ /sshnet/sixty40
> sshfs gene@lathe:/              /sshnet/lathe
> sshfs gene@GO704:/              /sshnet/GO704
> sshfs pi@rpi4:/			/sshnet/rpi4
> 
> but only root can execute this last line
> 
> sshfs gene@Hardinge1:/		/sshnet/Hardinge1
> 
> generating this error when I run this script as me.
> gene@coyote:~$ bin/mount-machines
> fuse: mountpoint is not empty
> fuse: if you are sure this is safe, use the 'nonempty' mount option
> fuse: mountpoint is not empty
> fuse: if you are sure this is safe, use the 'nonempty' mount option
> fuse: mountpoint is not empty
> fuse: if you are sure this is safe, use the 'nonempty' mount option
> fuse: mountpoint is not empty
> fuse: if you are sure this is safe, use the 'nonempty' mount option
> 
> The above mounts have already been done, and the onwership and perms 
> of /sshnet/Hardinge1 are identical to the other 4 above
> 
> fusermount: user has no write access to mountpoint /sshnet/Hardinge1

That's correct, isn't it?

> which is
> ls -la /sshnet/ (on this machine)
> total 84
> drwxr-xr-x  9 gene gene  4096 Feb  8 10:10 .
> drwxr-xr-x 28 root root  4096 Dec 12 03:44 ..
> drwxr-xr-x  1 root root  4096 Feb  4 15:59 GO704
> drwxr-xr-x  2 root root  4096 Feb  8 10:10 Hardinge1

    ↑

Root has write permission on that mount point, but not gene.

> drwxr-xr-x  1 root root  4096 Feb  3 14:16 lathe

                ↑↑↑↑

You say this mount point has already been mounted on, so that won't
be the ownership of the mount point, but of what's mounted on it.

> drwxr-xr-x  2 root root  4096 Apr 25  2019 redpitaya
> drwxr-xr-x  1 root root  4096 Feb  1 04:46 rpi4
> drwxr-xr-x  1 root root  4096 Feb  4 15:43 sixty40
> drwxr-xr-x  2 root root  4096 May  2  2019 vna
> 
> How do I fix this? I do not want a root perms holder to have access.
> Anything I need to do to any of thse machines that needs root, can be 
> done with sudo from a normal login as the first user.

Change the ownership of Hardinge1.

Cheers,
David.


Reply to: