Friday, March 04, 2011

Encrypted folder in Linux

We are using EncFS. It provides an encrypted filesystem in user-space.

You may need to load fuse module:

#modprobe fuse

Install encfs:
#apt-get install encfs

Optionally you may install (EncFS system tray applet for GNOME):
#apt-get install cryptkeeper

encfs [options] rootDir mountPoint
Here I am creating a root folder name encrypt for storing encrypted files.
Also creating a mount point folder named decrypt, which we will use to read/write files.
$encfs ~/.encrypt ~/decrypt

It will ask permission for creating the directory - type y here.
Now, it will ask for expert or pre-configured mode - use pre-configured - type p here.

It will ask for a password. Use a secure password here.

done! now you can use decrypt folder as an encrypted folder.

The actual data will be stored under .encrypt folder, and will be available via decrypt folder after mounting via encfs.

You may unmount it using:
$fusermount -u ~/decrypt


No comments: