Installing encfs in Mac OS X

There are a number of ways to install encfs in Mac OS X. In this tutorial, we will show you the homebrew and OSXfuse installation method. It will require the use of terminal, so be prepared to get your hands dirty. Homebrew is a useful package manager for Mac OS X. It allows you to install plenty of applications with a single command.

  1. Open Terminal in Mac OS X. If you are not aware of where it is located, you can find it at “Applications -> Utilities -> Terminal”. Type the command: This will install Homebrew in your system. If you have already installed Homebrew, you can ignore this step. To install encfs (in El Capitan), simply run the command in the terminal: Once the installation is completed, you will have encfs running in your system.

Using encfs in Mac OS X

Still in the terminal, you can create an encrypted filesystem in Dropbox using this command: 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. Save the file as “encfslogin.sh” in your User directory. Make the script executable:

  3. Next, open AppleScript editor and paste the line:

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. Image credit: security concept with a lock by BigStockPhoto