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

How to use bindfs in fstab with osxfuse+macOS Catalina #87

Open
x4base opened this issue Jul 8, 2020 · 3 comments
Open

How to use bindfs in fstab with osxfuse+macOS Catalina #87

x4base opened this issue Jul 8, 2020 · 3 comments

Comments

@x4base
Copy link

x4base commented Jul 8, 2020

Hi, here is my environment:
bindfs 1.14.7 installed with brew
osxfuse 3.11.0 installed using official dmg file
macOS 10.15.5 Catalina

Now
sudo bindfs ~/fake_root_dir/projects/ /projects_test/ works for me, but I want to use /etc/fstab to mount it on boot. So in /etc/fstab, I added:
/Users/x4base/fake_root_dir/projects/ /projects_test fuse.bindfs perms=0700,mirror-only=x4base,local,allow_other,extended_security,noappledouble 0 0

But the result is:

sudo mount -a
mount_apfs: volume could not be mounted: Operation not permitted
mount: / failed with 77
mount: exec /Library/Filesystems/fuse.bindfs.fs/Contents/Resources/mount_fuse.bindfs for /projects_test: No such file or directory
mount: /projects_test failed with 72

Do I really need the file /Library/Filesystems/fuse.bindfs.fs/Contents/Resources/mount_fuse.bindfs ? Where can I get it?

In osxfuse/osxfuse#194, someone says I can do sudo ln -s /usr/local/bin/bindfs /sbin/mount_fuse.bindfs, but the macOS now doesn't allow any modification to /sbin.

What is the proper way to solve it? Thanks!

@x4base
Copy link
Author

x4base commented Jul 8, 2020

OK, I found out that instead of using fstab, I can do auto-mount using LaunchDaemons like this:

/Library/launchDaemons/org.user.bindfs.projects.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>Label</key>
        <string>org.user.bindfs.projects</string>
        <key>ProgramArguments</key>
        <array>
                <string>/usr/local/bin/bindfs</string>
                <string>/Users/x4base/fake_root_dir/projects/</string>
                <string>/projects</string>
        </array>
        <key>RunAtLoad</key>
        <true/>
        <key>StandardErrorPath</key>
        <string>/tmp/org.user.bindfs.projects.err</string>
        <key>StandardOutPath</key>
        <string>/tmp/org.user.bindfs.projects.out</string>
        <key>WatchPaths</key>
        <array>
                <string>/projects</string>
        </array>
</dict>
</plist>

then
sudo launchctl load -w /Library/launchDaemons/org.user.bindfs.projects.plist

Then it works as expected.

If anyone knows how to do it in the fstab way, the answer is still welcomed. You can close this issue if you like. Thanks

@mpartel
Copy link
Owner

mpartel commented Jul 17, 2020

Thanks for following up with the workaround!

I don't test on MacOS very often or very thoroughly, so I'm not great at keeping up with all the new limitations and backwards-incompatibilities Apple likes to cook up :/

I'll leave this issue open for visibility. At some point I should probably document MacOS-specifics better on the website/readme/man-page.

@x4base
Copy link
Author

x4base commented Jul 20, 2020

That would be great, thanks!

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