Dropbox & EncFS on OS X Lion

I previously wrote about a method for creating a super-secure filesystem using Dropbox’s cloud storage.

After updating to Mac OS Lion I struggled to get the MacFusion GUI to work and so I wrote an application to automate the mounting and unmounting of the EncFS filesystem.

I also took the opportunity to switch from the now abandoned MacFUSE to Fuse4X, which is a properly maintained fork of MacFUSE started in June 2011.

The install procedure is much simpler than before, you install Fuse4X and EncFS, but instead of using the MacFusion GUI you just call my script instead.

To the instructions!

First download and install Fuse4X and a version of EncFS which uses the Fuse4X APIs. Thanks to Simone Lehmann for providing an EncFS Mac installer at http://www.lisanet.de/?p=128 (also mirrored here).

To create a new encrypted volume (stored locally at first to prevent the EncFS key from being synchronised with Dropbox):

encfs ~/Desktop/_Encrypted ~/Documents/_DropSec

Answer ‘yes’ when prompted to create the new folders and choose ‘p’ for pre-configured paranoia mode (256-bit AES encryption). Enter a secure EncFS password when prompted and you’re done.

Now the filesystem has been created we can deal with securing the key.

umount ~/Documents/_DropSec
mkdir ~/.keys
mv ~/Desktop/_Encrypted/.encfs6.xml ~/.keys/dropsec.xml

The commands above move your key from the EncFS filesystem into a hidden folder in your (local) home directory

Now move the entire ~/Desktop/_Encrypted folder (minus your key) into your Dropbox:

mv ~/Desktop/_Encrypted ~/Dropbox/

Finally download my DropSec application and copy it to your Applications folder.

The first time you run DropSec it will prompt you for your EncFS password which it stores in your local login keychain. The password must match the secure password you set in a previous step.

To mount or unmount the encrypted filesystem simply run the DropSec app. For convenience copy it to your Mac OS Dock for quick access.

Advertisements

12 thoughts on “Dropbox & EncFS on OS X Lion

  1. Pingback: Securing Dropbox | WebDiary.com

  2. Help: When trying to use your encfsadm script on OSX Lion I keep getting the following message:

    “23:49:33 (FileUtils.cpp:360) Found config file /Users/billybob/.keys/dropsec.xml, but failed to load
    Unable to load or parse config file”

    Any ideas on what may be causing this? Any assistance would be greatly appreciated!

    • According to the error message you quoted, the config file is there but may not be in the correct format.

      Have you looked inside your dropsec.xml file to check that the contents look like a regular XML file?

      • Yeap – figured it out thanks! It was all about ensuring I renamed the config for EncFS to the same as it was looking for.

        FYI – I also make some enhancements to the script to add in the following mounting options:

        -o volname (allows me to set the name in finder)
        -o volicon (allows me to include a path to a custom icon I wanted for the mounted drive which shows up on my desktop)

        Your post was very helpful, thank you again for sharing this!

  3. Hello. I followed your various download and scripting steps and thought I had made the expected progress until I downloaded EncFSadm, which did ask me for the EncFS p/w upon launching the app. And so I established it. But thereafter the app would not relaunch so I couldn’t mount / unmount. Crazy. Out of sudden preoccupation with the source of all these downloads, I uninstalled everything. This is a MacBook Pro on Lion 10.7.3. Any other complaints like mine? What do you suggest? Many thanks.

  4. Did another reinstall of everything above and still can’t launch the EncFSadm app. Don’t understand because it did initially launch immediately after installation, prompting me for my EncFS p/w. But after this nothing happens. Please let me know soon how to proceed. Thank you.

  5. Also tried several things such as repairing permissions but again nothing. I am now wondering what type or kind of release build this is. For example, the downloaded zip file did not contain an installer package, as is usual. Instead it unzipped to the app itself. No installation steps. Have never seen anything like this. Should I be concerned? Would you care to elaborate and perhaps even educate me on the above? Thank you once again.

    • I suspect that EncFSadm can’t find your config file. I’ve added some additional error trapping and uploaded a new version (v1.2.1). When you run it this time it should tell you where it’s having problems.

      There is not point creating a Mac installer package for a single file, so I made it simple and just put it in a Zip archive. There’s nothing to worry about there.

      I provide my EncFSadm app for free as an altruistic gesture to the Mac community. It works for me and many others, but I’ll do my best to get to the bottom of your problems.

      • Hello and thank you for your efforts. They are truly appreciated. Sure enough, it cannot find the EncFS config file. But it is in the .keys folder as an XML. When running one of the scripts above last night I did name the config file something else than “dropsec”. Could that be the problem? Thank you for guiding me further and looking forward to hearing back from you.

      • Thanks for all the feedback. The version of the EncFSadm app I first posted did not match the directory structure that I gave in the instructions. D’oh!
        I’ve fixed that now and all should be ok with the latest version.

      • No, thanks to you. It’s all working charmingly now. It should have occurred to me much earlier to check the path assigned to DROPBOXDIR in encfsadm.sh. Thanks again.

      • Hello iDJH, just thought I’d link to a couple of comments I posted to BoxCryptor’s forum where I mention your EncFS solution. The second comment in particular has an enhancement idea for your app (which I am certain you have already thought of). I do hope you can work at making this a robust and sanctioned app for Mac OS X Lion and Mountain Lion and beyond. It represents a great opportunity and potential, IMHO. Good luck!

        http://forums.boxcryptor.com/topic/ios-open-in#post-1016

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 )

Google+ photo

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

Connecting to %s