guest@6admin.io:~$

EncFS: file encryption without a dedicated partition

Encrypting your data on Linux has always meant LUKS, dm-crypt, a dedicated partition, a reinstall. EncFS breaks that pattern: it is a FUSE filesystem that encrypts file by file, in a normal directory, without a dedicated partition, without reinstalling and without root access after the first mount.

The principle

EncFS creates two directories: the cipher (the encrypted files, with encrypted names too) and the plain (the mount point, where files appear in cleartext). Everything you write to the plain is encrypted on the fly and stored in the cipher. Everything you read from the plain is decrypted on the fly from the cipher. Unmount the plain and all that remains is the cipher: unreadable names, encrypted content.

Installation

apt-get install encfs

FUSE is a prerequisite (encfs is a FUSE client, it runs in userspace, not in the kernel). That is why it works without root: the mount is a FUSE mount, not a kernel mount.

Creation

encfs ~/.cipher ~/.plain
# Answer the questions (paranoid mode = AES-256, block size 1024)
# Enter a passphrase

Paranoid mode is the most secure: AES-256, IV derived from the filename (two files with identical content do not produce identical encryption), reduced block size to prevent file-size leaks.

Mounting

encfs ~/.cipher ~/.plain
# Enter the passphrase
# Files appear in ~/.plain in cleartext

And to unmount:

fusermount -u ~/.plain

The content of ~/.cipher remains encrypted. An ls ~/.cipher shows unreadable names like Xk3jHf9sL2m,4NpQ.

What it is for

Three cases I encountered this year:

  1. The encrypted USB key: the portknocking reads the kssh/kscp functions from a USB key mounted with encfs (the smount in the .bashrc). The key contains the functions, the passphrase is only requested at mount time and if the key is lost, the port combination is not compromised.
  2. Data on a shared server: an encrypted directory in a shared home, without asking the admin to create a LUKS partition.
  3. Encrypted backup: an rsync to an encfs directory and the remote backup only contains ciphertext.

What it does not do

EncFS does not encrypt the swap, does not encrypt your applications’ temporary files (tmp/) and does not protect against a keylogger while the plain is mounted. It is encryption at rest, not encryption in use.

EncFS is also vulnerable to metadata analysis: the number of files, their sizes, the timestamps of the cipher, all visible without the passphrase. Paranoid mode reduces the leak (fixed-size blocks), but the file count remains visible.

[edit: 2026] EncFS was audited by Taylor Hornby (Defuse Security) in 2014 and vulnerabilities were identified. The project is in maintenance mode and the modern alternatives are gocryptfs (Go, faster, audited safe) and fscrypt (kernel native). The principle of encryption without a partition remains valid, but EncFS has been replaced in practice.