2014/01/09

Creating Encrypted Directories With EncFS

> EncFS (Encrypted Filesystem) is a tool for encrypted filesystems in user space. It does not require any special permissions, since it uses FUSE.

Considering I will use encrypted folders mainly on things that need frequent backup, the advantages are:

  • per file encryption: will help on incremental backups;

  • encrypted folder can grow: a great advantage against a loopback filesystem (like TrueCrypt, where you need to allocate resources before using them;

  • do not need root permissions: on every host there is FUSE support, I can use EncFS and

  • the configuration is straightforward.

I have used eCryptfs before, but it does require configuring `fstab` or having root privileges for mounting the encrypted folders. The configuration is much more complicated.

Configuration

First of all, make sure you have FUSE and EncFS installed on your system.

You will need a directory for the encrypted data to be stored and another directory to mount the encrypted directory. For the example, let's call the directories `encrypted` and `decrypted`, respectively. Both on the home directory.

$ encfs ~/encrypted ~/decrypted

Notice that full paths are necessary. You will be prompted if you want the preconfigured options or to configure it yourself. I choose the defaults. At the end, you will be prompted for a password and confirmation.

To mount the encrypted folder again, the command is the same:

$ encfs /full/path/to/encrypted_folder /full/path/to/decrypted_folder

And to umount it:

$ fusermount -u /full/path/to/decrypted_folder

External Links

Revision History

Post built on: 2014-01-16 01:06:27
Last modified on: 2014-01-16 01:05:58
First published on: 2014-01-09

Revision Date Description
0.01 2014-01-09 Initial revision. Not verified.
1.00 2014-01-09 Minor modifications and corrections. Published.
1.01 2014-01-15 Adding new "syntax" for code examples.
1.02 2014-01-15 A link was not set to external.

No comments :

Post a Comment