Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combining simple arguments can result in permission error #48

Open
boltronics opened this issue Feb 4, 2017 · 1 comment
Open

Combining simple arguments can result in permission error #48

boltronics opened this issue Feb 4, 2017 · 1 comment

Comments

@boltronics
Copy link

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.

mpartel added a commit that referenced this issue Feb 4, 2017
@mpartel
Copy link
Owner

mpartel commented Feb 4, 2017

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants