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

Re: What has fowled sshfs in buster



	Hi.

On Mon, Oct 28, 2019 at 08:45:56AM -0400, Greg Wooledge wrote:
> On Sun, Oct 27, 2019 at 02:41:01PM -0400, Gene Heskett wrote:
> > > > gene@coyote:/etc/ssh$ sshfs pi@rpi4:/ /sshnet/rpi4
> > > > fusermount: user has no write access to mountpoint /sshnet/rpi4
> 
> That error message is as clear as one could possibly ask.
> 
> > sudo chown 1000:1000 /sshnet/rpi4
> 
> Good.  You fixed it.

An interesting assumption, but it's a wrong one.
For instance,

$ mkdir -m500 .fuse/1
$ sshfs .fuse/1 localhost:
fusermount: user has no write access to mountpoint /home/user/.fuse/1

And the reason for this is that fusermount is checking the write access
to the future mountpoint for some reason (too lazy do dig the code to
see what's it about):

$ strace -fe trace=file sshfs .fuse/1 localhost: 2>&1 | grep -B3 EACCES
[pid 32689] lstat("/home/user/.fuse/1", {st_mode=S_IFDIR|0500, st_size=4096, ...}) = 0
[pid 32689] chdir("/home/user/.fuse/1") = 0
[pid 32689] lstat(".", {st_mode=S_IFDIR|0500, st_size=4096, ...}) = 0
[pid 32689] access(".", W_OK)           = -1 EACCES (Permission denied)


> > sudo chmod 1777 /sshnet/rpi4
>
> But then you did *that*.  Why?

I agree that "chmod +w" would suffice here, *and* it should be the first
thing that anyone should try (a hint - error message says it).
"sudo chmod" is so Ubuntu, and all that.

But after the chown, /sshnet/rpi4 is a user directory anyway, and a user
is free to have any permissions on own directories, including insecure
ones.

Reco


Reply to: