How to use BoxCryptor with EncFS on Mac OS X

UPDATE 08/04/2011:
We have released an easy, “one-click” EncFS installer for Mac OS X!

UPDATE 05/07/2012:
We have released a first beta of BoxCryptor for Mac OS X! You can find more information in our forums.  

If you use BoxCryptor to encrypt (parts of) your Dropbox folder, an USB stick or an external harddisk and want to share the encrypted data with a computer running Linux or Mac OS X, a great feature of BoxCryptor is the compatibility with EncFS, an open-source cryptographic filesystem. As EncFS had some security issues in previous version, a prerequisite is to have EncFS version >= 1.7 installed.

Many tutorials (e.g. here and here) for EncFS on Mac OS X use a pre-built binary of EncFS provided by the EncFSVault project. Unfortunately, this binary is a very old version of EncFS (1.3.2) and can not be used together with BoxCryptor.  After describing how to install the latest EncFS version 1.7.4 on Ubuntu, I’m now going to show how to do it on Mac OS X.

1. Install XCode

Because we compile EncFS ourselves, we need the development tools (e.g. gcc compiler) provided by XCode. XCode should be located in the “Optional Installs” folder of your Mac OS X install DVD. Alternatively you can download the latest XCode 4 (which costs US-$4.99) or the free XCode 3 which also works (free registration as an Apple Developer is required).

Xcode_1Xcode_2Xcode_3Xcode_4Xcode_5Xcode_6Xcode_7Xcode_8Xcode_9

2. Install MacFUSE

EncFS requires MacFUSE which allows you to extend Mac OS X via 3rd-party file systems. Download MacFUSE and install it by executing the downloaded MacFUSE.pkg

Macfuse_0Macfuse_2Macfuse_3Macfuse_4Macfuse_5Macfuse_6Macfuse_1

3. Install Homebrew

In order to install UNIX tools on Mac OS X we have to install Homebrew by executing the following command in a Terminal:

    $ ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"

    4. Install EncFS

    Now we’re finally ready to compile and install EncFS 1.7.4 on our Mac. It is as simple as executing the following command in a Terminal. Homebrew downloads the sources of EncFS and a few dependencies and compiles and installs them. This may take some time.

      $ brew install encfs

      5.a Mount the encrypted folder in Terminal

      If you don’t need a graphical interface to mount and unmount folders with EncFS, you can now mount the folder encrypted by BoxCryptor (e.g. ~/Dropbox/BoxCryptor) to a folder where we can access the decrypted, plaintext files (e.g. ~/BoxCryptor). Execute the following command in a Terminal and enter the correct password. Then skip to section 6.

      $ encfs ~/Dropbox/BoxCryptor ~/BoxCryptor

      5.b Mount the encrypted folder in MacFusion

      MacFusion is a nice graphical interface to mount and unmount FUSE based file systems. Just download the latest version from the website and start the downloaded application. MacFusion only has built-in support for SSHFS and FTPFS, so we need to also install the EncFS plugin for MacFusion. Exit MacFusion again, download the EncFS plugin and install it by executing the downloaded installer.

      Macfusion_encfs_1Macfusion_encfs_2Macfusion_encfs_3Macfusion_encfs_4Macfusion_encfs_5Macfusion_encfs_6Macfusion_encfs_7

      When the installation finished, start MacFusion and add a new EncFS configuration by clicking the “Plus”-sign in left bottom corner and selecting EncFS. Select the folder encrypted by BoxCryptor (e.g. ~/Dropbox/BoxCryptor) as EncFS Raw Path and enter the correct password. Now switch to the Macfusion tab, choose a Mount Point (e.g. ~/BoxCryptor), a Volume Name and click “OK”.

      Macfusion_encfs_8Macfusion_encfs_9Macfusion_encfs_10Macfusion_encfs_11Macfusion_encfs_12Macfusion_encfs_13

      Now, press the “Mount” button and allow keychain access!

      6. That’s it! You can now encrypt and decrypt files from BoxCryptor with EncFS on Mac OS X! Happy (secure) syncin’ with Dropbox and all the other cloud storage services like iCloud/MobileMe or SugarSync!

      Comparison_mac_os_x_englishComparison_mac_os_x_terminal_english

      $ ls -l ~/Dropbox/BoxCryptor/total 936-rw-r--r--@ 1 johndoe  staff      54 Jun 18 11:35 63eqwtqnPrYTxo5w-rw-r--r--  1 johndoe  staff   12189 Jun  1 08:26 QZBwXnE4j03EpIOcuwLYqDJn-rw-r--r--@ 1 johndoe  staff  436905 Jun 18 08:33 TUquvDfx,mbDANmrUz7-rw-r--r--  1 johndoe  staff    6148 Jun 19 07:42 dqtqUfXDfEF,rJ7-rw-r--r--  1 johndoe  staff   14302 May 31 04:54 elNypUIWyvE2CR4b-29drwxr-xr-x  4 johndoe  staff     136 Jun 19 08:05 gQ,Q9tc3A,8Hdrwxrwxrwt@ 3 johndoe  staff     102 Jun 18 11:30 s6uASun6QdAbheRWg45Ai13$ ls -l ~/BoxCryptor/total 928drwxr-xr-x  4 johndoe  staff     136 Jun 19 08:05 Finance-rw-r--r--  1 johndoe  staff   12189 Jun  1 08:26 Launch plan.xlsx-rw-r--r--  1 johndoe  staff   14302 May 31 04:54 Meeting.docx-rw-r--r--@ 1 johndoe  staff  436905 Jun 18 08:33 Product.pptx-rw-r--r--@ 1 johndoe  staff      54 Jun 18 11:35 Readme.txt

      UPDATE 08/04/2011:
      We have released an easy, “one-click” EncFS installer for Mac OS X!

      UPDATE 05/07/2012:
      We have released a first beta of BoxCryptor for Mac OS X! You can find more information in our forums.

      17 thoughts on “How to use BoxCryptor with EncFS on Mac OS X

      1. Trying to do step 3 (Install Homebrew), I’m getting:curl: (60) SSL certificate problem, verify that the CA cert is OK. Details:error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

      2. And it works! EncFS 1.7.4 successfully installed. The, hopefully, last problem is this: After mounting the folder (everything works smoothly), when trying to open the decrypted one in Finder, I get the following message:The folder "MacFUSE Volume 1 (encfs)" could not be opened because you do not have sufficient access privileges.

      3. Phew, we’re getting there ;) can you execute the following commands and post the result here? (SOURCE is the folder containing the encrypted files)$ ls -alOe /SOURCE$ id

      4. I’m sorry, I’m no Mac OS X expert, so I can’t give a specific recommendation. Generally it’s the best to go with the latest stable version which is 2.0.3.2 right now.

      5. I keep getting stange errors in the verbose mode of my macbook, but MacFuse is running fine. I’m a little bit worried that the errors could have an impact on data storage. Here is what I found out:1) Install http://macfuse.googlecode.com/files/MacFUSE-2.0.3%2C2.dmg – RESTART2) Install http://www.tuxera.com/mac/macfuse-core-10.5-2.1.9.dmg – RESTART3) Install http://content.wuala.com/contents/grahamperrin/public/2010/07/31/a/MacFUSE.prefPane-2.0-64-bit-2009-09-10.zip?dl=1By the way: The EncFS Plugin is updated to Version 0.2.http://thenakedman.wordpress.com/2011/06/22/new-encfs-plugin-for-macfusion2-released/

      6. I keep getting stange errors in the verbose mode of my macbook, but MacFuse is running fine. I’m a little bit worried that the errors could have an impact on data storage. Here is what I found out:1) Install http://macfuse.googlecode.com/files/MacFUSE-2.0.3%2C2.dmg – RESTART2) Install http://www.tuxera.com/mac/macfuse-core-10.5-2.1.9.dmg – RESTART3) Install http://content.wuala.com/contents/grahamperrin/public/2010/07/31/a/MacFUSE.prefPane-2.0-64-bit-2009-09-10.zip?dl=1By the way: The EncFS Plugin is updated to Version 0.2.http://thenakedman.wordpress.com/2011/06/22/new-encfs-plugin-for-macfusion2-released/

      7. On the mac side, installing encfs with MacPorts also works. The only problem comes up when you try to install the MacFusion plugin – it fails in detecting the encfs utility. As an elevated user, do -ln -s /opt/local/bin/encfs /usr/local/bin/encfsand the plugin’s installer should be happy.There’s also a newer fork of MacFuse to keep an eye on, Fuse4x.

      8. I’ve been trying this, but theres been too many compatibility issues, plus, it requires a significant amount of space on my SSD…we just need a compatible build of boxcryptor.

      9. did one ever try to sync with rsync into an encfs which points to a webdav share?I do only get errors after the first files and afterwards the complte encfs mountpoint is not working anymore.Anyone any directions ? Ideas?

      Leave a Reply

      Fill in your details below or click an icon to log in:

      WordPress.com Logo

      You are commenting using your WordPress.com account. Log Out / Change )

      Twitter picture

      You are commenting using your Twitter account. Log Out / Change )

      Facebook photo

      You are commenting using your Facebook account. Log Out / Change )

      Connecting to %s