bindfs
bindfs copied to clipboard
Combining simple arguments can result in permission error
I wanted the ability to create read-only bind mount as an unprivileged user to avoid a firejail limitation, and bindfs (which I just discovered - very nice project BTW) looked like the perfect tool for the job! So I executed something like:
$ bindfs -nr /home/user/olddir /home/user/newdir
fusermount: option allow_other only allowed if 'user_allow_other' is set in /etc/fuse.conf
Running --help
doesn't list -r
as requiring root, and running as root would defeat the point for my use case. I also didn't want to grant fuse more privileges than necessary by adding user_allow_other
to /etc/fuse.conf
, but I was sure it should be possible without it so I was scratching my head looking through the man page, doing web searches, etc.
I eventually figured out the following works:
$ bindfs -n -r /home/user/olddir /home/user/newdir
Success! So there is just a small usability issue there when combining simple arguments.
bindfs is to some extent at the mercy of FUSE's option parser and fuse_main
's order of doing things. The correct place to fix this would be somewhere in libfuse I think.
It turns out -n
is the only parameterless short option in bindfs besides the ones provided by FUSE, so I decided to deprecate it. That should address at least this specific case, though it's by no means a satisfying fix.
I'll leave this issue open for discoverability, and in case I or someone else feels like delving into libfuse's internals at some point.
Thanks for reporting!