Skip to content

Instantly share code, notes, and snippets.

@JohannesHoppe
Last active July 7, 2021 01:58
Show Gist options
  • Save JohannesHoppe/79e6244b6b279f4b273557979b9fa723 to your computer and use it in GitHub Desktop.
Save JohannesHoppe/79e6244b6b279f4b273557979b9fa723 to your computer and use it in GitHub Desktop.
encfs / osxfuse troubleshooter: What I did to make it running again

encfs / osxfuse troubleshooter

My setup:
macOS High Sierra (10.13.3). I decrypt my cloud-data via encfs, which uses osxfuse. Years ago I used BoxCryptor v1 to encrypt my files, but now I'm on macOS and use free software to decrypt my files. (Hint: Don't use BoxCryptor v2, they switched to a proprietary encryption format!)

Problem:
Suddenly after a reboot encfs wasn't working at all.

1. Troubleshoot via verbose mode:

/usr/local/bin/encfs -f -v '/Users/USERNAME/Dropbox/BoxCrypter' '/Users/USERNAME/Daten'

--> Error message: mount_osxfuse: the file system is not available (255)

2. Update encfs and friends

brew doctor
brew reinstall osxfuse
brew upgrade encfs

Reboot!

3. Next try

/usr/local/bin/encfs -f -v '/Users/USERNAME/Dropbox/BoxCrypter' '/Users/USERNAME/Daten'

With the latest version of encfs, there was a little bit more context:

kext load failed: -603947007
mount_osxfuse: the file system is not available (255)

Lools like it's an issue with the kernel extension (kext).

4. Checking the status of the osxfuse kext

kextstat | grep osxfuse
(no output!)

Let's see what's registered:

kextstat

Output: very much stuff. And also this:

org.virtualbox.kext.VBoxUSB
org.virtualbox.kext.VBoxNetFlt
org.virtualbox.kext.VBoxNetAdp
org.virtualbox.kext.VBoxDrv

osxfuse/osxfuse#315 (comment)

FUSE needs to register a virtual device for exchanging messages between the kernel and file systems like sshfs. The number of available device slots is limited by macOS. So if you are using other software that eats up all these device slots FUSE will not be able to register its virtual device.

Yes, I installed some stuff lately (without reboot) and I also mounted a samba share. Looks like I reached the limit.

Quick solution could be (source):

kextunload -b com.apple.filesystems.smbfs

But actually I need all the software and I want to access the network drive as well. But Oracle VM VirtualBox is not any longer required to run docker. So let's free up some resources!

5. Let's uninstall vbox!

https://osxdaily.com/2019/01/25/uninstall-virtualbox-mac-completely/

  1. Download the latest VirtualBox installer file from Oracle if you don’t have it already on your Mac
  2. Mount the VirtualBox disk image file and open that mounted dmg in the Finder
  3. Double-click on the text file named VirtualBox_Uninstall.tool to launch into a new Terminal window
  4. Confirm that you wish to completely uninstall VirtualBox by typing ‘yes’ when requested

Reboot!

6. Check status of fuse

kextstat | grep osxfuse
> com.github.osxfuse.filesystems.osxfuse

Yay! 😃

Mount it again:

/usr/local/bin/encfs -f -v '/Users/USERNAME/Dropbox/BoxCrypter' '/Users/USERNAME/Daten'

And it works again! Now it's fine to mount it as a daemon again, like this:

/usr/local/bin/encfs -S -o allow_other -o local -o volname='Daten' '/Users/USERNAME/Dropbox/BoxCrypter' '/Users/USERNAME/Daten'

Hint: -S read password from standard input, without prompting. This may be useful for scripting encfs mounts.

7. Use a GUI for daily use

The user interface https://github.com/corelan/pyencfsgui by Peter Van Eeckhoutte ist nice to work with. On a restart I am prompted for the password, so that I do not need to store it on a drive.

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