I cannot understand the idea behind Encfs. Even ready example, offered by my Ubuntu, does not work for me:
encfs ~/crypt ~/.crypt
There is an error:
unable to locate a mount point
Should I initialize the files somehow? What is wrong?
As I use encfs since 2009 and until now every day, I will make a quick how to :
fuse and encfs only, they can be found directly in your package management
Debian : apt-get install encfs
Fedora : yum install encfs
Gentoo : emerge encfs
...
(select only encfs will install dependencies automatically)
If you want to use encfs with your user (no root), you must add fuse on the group of this one first. Open a terminal and log in root :
adduser youruser fuse
replace youruser by your.
Once add, kill and restart X or just reboot your computer.
Now open a terminal (in user $) :
groups
If you see fuse, then you can create the directory now by this command :
encfs /home/youruser/.crypt/ /home/youruser/crypt
.crypt and crypt directory must not exist, if they exist, delete them or choice another path
The first time, it will display as follow :
The directory "/home/youruser/.crypt/" does not exist. Should it be created? (y,n) y
The directory "/home/youruser/crypt" does not exist. Should it be created? (y,n) y
Please choose from one of the following options: enter "x" for expert configuration mode, enter "p" for pre-configured paranoia mode, anything else, or an empty line will select standard mode. ?> p
New Encfs Password:
Verify Encfs Password:
As showed, answer -> first y | second y | third p
Once created, the directory crypt is mounted (by default), add files inside crypt directory. For make them unreadable :
fusermount -u /home/youruser/crypt
This will unmount the directory crypt, all the file inside "disappear" and can be found encrypted on the directory .crypt :
ls /home/youruser/.crypt/
Will display something like (3 files on this example) :
0WoRsjyzZHI,Un-198TRY-dU 91rj264Z09Jcz7XZ4sbDeYfd KpJTDI2TVUEFHTkksqxPT9xu
For get back your crypted file readable, do :
encfs /home/youruser/.crypt /home/youruser/crypt
Will output a prompt requiring your password
Be aware, except your encrypted file, you absolutely need to backup the file encfs6.xml which contain your encoded password and his salt generation.
http://en.wikipedia.org/wiki/Salt_%28cryptography%29
this file can be found :
/home/youruser/.crypt/.encfs6.xml
Best way to backup your crypted data in a proper way :
tar cvzf CryptedBackup.tar.gz /home/youruser/.crypt/
With the backup, on your other computer/server just unpack it to the /home/user/ and create the mount point (mkdir /home/user/crypt) and it will work.
Careful, if you lost your password, or if your encfs6.xml is missing, is no way to get back your encrypted
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With