Homebrew “brew install encfs”, and mount your Volume “encfs -o volname=MySecretDrive ;Path/To/EncFS /Volume/MySecretDrive”.
Using encfs in Mac OS X
Still in the terminal, you can create an encrypted filesystem in Dropbox using this command:
encfs ~/Dropbox/Private ~/Private
Go through the setup process. You will be prompted to enter a master password. Make sure you use a strong password and remember it. Once completed, you should see a “Private” folder in your Home directory. Any file you place in this folder will be encrypted and stored in the “Dropbox -> Private” folder.
Automount encrypted directory on startup
It is very troublesome if you have to mount the encrypted directory everytime you login. Use the steps below to automount the encrypted directory when you login.
1. Open “Keychain Access”. We will be adding your encfs master password to Keychain so the script can automount the encrypted directory without prompting you for password. Add a new entry. Enter “encfs” for both the “Item name” and “Account Name” field. Once you have added the password, you can close Keychain Access.
2. Open a text editor and copy the following text into it.
#!/bin/bash ENCFS="/usr/local/bin/encfs" ENCDIR="$HOME/Dropbox/Private" DECDIR="$HOME/Private" security find-generic-password -ga encfs 2>&1 >/dev/null | cut -d'"' -f2 | "$ENCFS" -S "$ENCDIR" "$DECDIR"
Save the file as “encfslogin.sh” in your User directory.
Make the script executable:
chmod a+x encfslogin.sh
3. Next, open AppleScript editor and paste the line:
do shell script "$HOME/encfslogin.sh"
and save it as an application in your User directory.
4. Lastly, go to “System Preferences -> Users & Groups”, click on your User account and select “Login items”. Add the encfslogin application to the startup list.
Log out and login again. Your encrypted directory should be auto-mounted now.