How to encrypt a folder

Post tutorials, HOWTO's and other useful resources here.
Post Reply
User avatar
Site Admin
Site Admin
Posts: 5436
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil

How to encrypt a folder

Post#1 by brokenman » 09 Aug 2014, 04:12

From Porteus-v3.0.1+ the kernel contains ecryptfs which is an encrypting file system used in ubuntu and chromeOS. (thanks fanthom)

I have put together a bundle including keyutils, ecryptfs-utils and some scripts that make it easy to use an encrypted folder.

Requirements for this simple version.
1) Only root can encrypt folders
2) It is only really usable together with the changes= cheatcode.
3) The encrypted (lower) directory is hardcoded at /root/.Private
You may change the location of the folder where you want to mount your file system (upper) unencrypted. The default location is /root/Private. When the filesystem is mounted you can put files into /root/Private. When you unmount the file system the files remain encrypted in /root/.Private.

Download the module and activate it.
Open a root terminal.
pcrypt create # This will create an encrypted folder and ask you to use a passphrase which is recorded.
pcrypt move # This will move your current upper directory /root/Private to anywhere else you want it (it doesn't copy over old files)

After this you can simply enter as root in a terminal mcrypt to mount your file system or ucrypt to unmount it.

For the more advanced users you can check out the wiki and the ecryptfs scripts in /usr/bin and encrypt your entire $HOME folder. You can have it automatically mounted at boot too. I havn't included any instructions because i would first like people to test this folder encryption system to see if it is worthwhile creating some type of GUI for it. Or perhaps encFS is a better choice.

32bit ... bundle.xzm

64bit ... bundle.xzm
How do i become super user?
Wear your underpants on the outside and put on a cape.

Post Reply