Possible Duplicate:
Is there a way to password protect individual folders?
Something without creating new filesystem/emcrypted-partition, do you know a good program?
Thanks!
Possible Duplicate:
Is there a way to password protect individual folders?
Something without creating new filesystem/emcrypted-partition, do you know a good program?
Thanks!
There is a couple of ways to do this.
1) using crypt command. This command can encrypt and decrypt a file for you. (you might need to install it by 'sudo apt-get install mcrypt').
2) change read permission for the directory.
You can create/mount an encrypted directory with
encfs
like this:The first time you do this it will ask some questions, you can accept the defaults, and it will ask for a password which you will have to enter later every time to unlock.
The encrypted content will be created under $PWD/raw, which will be mounted on $PWD/content. You can create files in $PWD/content or just copy there, and you will see that $PWD/raw gets populated with unreadable data. $PWD/content is visible only by your user, not even root can see it. When you are done editing, unmount with
fusermount -u ./content
, this will wipe out the content of $PWD/content. To mount again, repeat theencfs
command above.The path parameters for
encfs
must be absolute paths, that's why I used$PWD
above, to use directories in the current working directory.The
-i 5
means unmount automatically after idle for 5 minutes.