Closed vimist closed 1 year ago
Sorry for the slow response.
If you are on FUSE 3, then the setuid=...
option documented in man fuse
looks promising. There's also uid
and user_id
but I'm not sure what those do.
No problem, I appreciate you taking the time to reply. setuid
does indeed do what I was looking for. I don't think I was aware that a lot of the options are inherited from fuse and the normal mount command, so I had only checked the bindfs
man page.
In the end, my fstab
entry looked something like this:
/somewhere /somewhere_else fuse.bindfs setuid=user 0 0
Now, anyone accessing /somewhere_else
does so with the permissions of user
. I'm making use of ACLs in /somewhere
and (though not thoroughly tested yet) I think there are some issues I've got to work through there, possibly what's detailed in #91.
Thanks for your help!
I don't think I was aware that a lot of the options are inherited from fuse and the normal mount command, so I had only checked the bindfs man page.
It's far from obvious. I've added a mention of the fuse man page to the bindfs man page (for the next release) :+1:
Hi,
I've only recently come across
bindfs
(thanks for such a useful tool!), so I could very well be misunderstanding or misinterpreting the documentation, but I've been testing various combinations of flags and can't seem to get it to work the way I would like. I've got an example scenario below that should demonstrate my point.If we run
bindfs
with no flags (asuser
) we get the behaviour I'm looking for:Anyone that accesses
/somewhere_else
will access it with the permissions ofuser
(asuser
is the user that performed the mount); even ifroot
runstouch /somewhere_else/file
the/somewhere/file
file will be owned byuser
and within/somewhere_else
root
will not be able to access/do anything thatuser
couldn't. This is what I want, but I don't believe it's possible to achieve this effect when mounting using/etc/fstab
or when executingbindfs
asroot
.After running the above
bindfs
command, if you runmount
it shows this:user
has the UID 1000 and GID 1000, hence theuser_id=1000,group_id=1000
. I would like to be able to specify these as mount options, but when I attempt this, I get an error:mounting /somewhere on /somewhere_else failed: Invalid argument
; I believe these options are the options that are causing the behaviour I'm looking for.For the minute I think I'll have to run a script at boot to achieve what I want, but I would like to just be able to add an
fstab
entry. It's also quite possible I've overlooked one of the existing flags that does this, in which case, apologies for wasting your time.Thanks for taking the time to read over this! :)