Wednesday, December 8, 2010

Encrypt files using EncFS

Creating an encrypted folder using EncFS is a easy job. It's a simple utility to encrypt your files. At first you have to login as a root.
Execute >su & enter root password.

Install encfs & fuse.
$apt-get install encfs fuse-utils

Load the use module in the kernel as root
$modprobe fuse


Create to folders. Note that . is used for hidden folders. Execute 'ls -a' to see hidden files/folders

$mkdir .folder
$mkdir folder

Now we need to mount these folders with encfs.The following command will ask you some things needed to create the encrypted file system, as the password which will protect this file.By simply pressing [ENTER] to these questions (except the password ...), we will have a settings arrangement that suits most people. Otherwise,check the questions one by one, reading the man pages more ...
$encfs /home/user/.folder /home/user/folder

Now file is ready to add private data. add some files & unmount the folder by executing.
$fusermount -u /home/user/folder

After executing this command check the content of folder directory. It will be empty. If you check the content of .folder, it will be encrypted.
To read the files again you have to mount it again. execute-
$encfs /home/user/.folder /home/user/folder

Provide the password & your files will be visible again.

Reference:
http://open-help.org/tutorials/applications/encfs

No comments:

Post a Comment