How to Fix: OSXFuse mounted directory ownership error with automount SSHFS
Fixing OSXFuse mounted directory ownership error with automount SSHFS on macOS Sierra.
📋 Table of Contents
The issue of OSXFuse mounted directory ownership error with automount SSHFS affects users running macOS Sierra who are trying to configure auto-mount of external server's directory via SSHFS and osxfuse. This problem can be frustrating as it prevents normal users from accessing the mounted directory, even though they have been granted appropriate permissions.
Despite extensive research, users have found limited solutions to this issue, making it a challenging problem to solve.
🔍 Why This Happens
- The primary reason for this error is that the `allow_other` option is not correctly set in the system configuration. The `osxfuse.tunables.allow_other` sysctl is used to enable or disable the sharing of ownership between the user and the root, but some users may not be aware that this sysctl does not exist on their system.
- An alternative reason for this error could be due to a mismatch in the file paths used to load osxfuse. The `load_osxfuse` script is typically located at `/Library/Filesystems/osxfusefs.fs/Contents/Resources/load_osxfuse`, but some users may have found an outdated or incorrect path, leading to the failure of this script.
🚀 How to Resolve This Issue
Enabling the `allow_other` sysctl
- Step 1: Open a Terminal application and type the following command: `sysctl -w osxfuse.tunables.allow_other=1`. This will enable the sharing of ownership between the user and the root.
- Step 2: If you encounter an error message indicating that the `osxfuse.tunables.allow_other` sysctl does not exist, you can try adding a new sysctl configuration using the following command: `defaults write osxfuse tunables allow_other -bool true`. This will create a new key-value pair in the defaults file and enable the sharing of ownership.
- Step 3: Restart your system or reload the osxfuse configuration by typing `killall -HUP mDNSResponder` to apply the changes.
Creating a custom `load_osxfuse` script
- Step 1: Open a text editor and create a new file named `load_osxfuse`. Copy the following code into the file: `#!/bin/bash load_osxfuse -f /Library/Filesystems/osxfusefs.fs/Support/load_osxfuse`. This will enable the osxfuse configuration script.
- Step 2: Save the file and make it executable by typing `chmod +x load_osxfuse` in the Terminal.
- Step 3: Move the new `load_osxfuse` script to the correct location: `mv load_osxfuse /Library/Filesystems/osxfusefs.fs/Contents/Resources`. This will ensure that the osxfuse configuration script is loaded correctly.
💡 Conclusion
By following these steps, users should be able to resolve the OSXFuse mounted directory ownership error with automount SSHFS. Remember to restart your system or reload the osxfuse configuration after making changes to ensure that the new settings take effect.
❓ Frequently Asked Questions
🛠️ Related Fixes
How to Fix: Pc crashes shortly after launching game (rainbow
Fix Pc crashes shortly after launching game (rainbow six siege). Compl
How to Fix: Installing an APK on a locked down phone
Installing an APK on a locked down phone: Try using a rooted device, e
How to Fix: New PC build- no signal and no clue
Fix New PC build- no signal and no clue. Complete troubleshooting guid