I’m using encfs to encrypt my data before storing it in the cloud, e.g., on Dropbox. Thereby, companies have no access to the original data. On the other hand, I should be able to access my files as easy as possible, including automatic mounting without the need to enter any password.
At first, we need a custom wrapper for the encfs binary:
encfs --public --extpass="cat /home/me/bin/encfs_password" $*
We need this wrapper Number Search , because it isn’t possible to provide encfs options in fstab. The public option allows every user to access the decrypted files, even if the directory was mounted by root (via fstab). Via extpass the password is read from the file /home/me/bin/encfs_password. This file should only contain the encfs password. Don’t forget to make the wrapper executable.
Finally, we add the following line to /etc/fstab:
/home/me/bin/encfs#/home/me/.encrypted /home/me/decrypted fuse rw,user,auto 0 0
Change the paths according to your setup.
More information: http://wiki.gentoo.org/wiki/User:Feystorm#EncFS_.26_autofs.2Ffstab