To create a private encrypted folder in ubuntu is very easy by ecryptfs. eCryptfs is a cryptographic stacked Linux filesystem. eCryptfs stores cryptographic metadata in the header of each file written, so that encrypted files can be copied between hosts; the file will be decrypted with the proper key in the Linux kernel keyring. There is no need to keep track of any additional information aside from what is already in the encrypted file itself. You may think of eCryptfs as a sort of “gnupgfs”, or “gnupg as a filesystem”.
eCryptfs is widely used, as the basis for Ubuntu’s Encrypted Home Directory, natively within Google’s ChromeOS, and transparently embedded in several network attached storage (NAS) devices.
Originally authored by Michael Halcrow and the IBM LInux Technology Center, eCryptfs is derived from Erez Zadok’s Cryptfs, and the FiST framework for stacked filesystems. eCryptfs extends Cryptfs to provide advanced key management and policy features. eCryptfs is currently actively maintained by Dustin Kirkland (of Gazzang, Inc) and Tyler Hicks (of Canonical, Ltd).
install eCryptfs via apt-get command in terminal:
sudo apt-get install ecryptfs-utils
Then run this command, input user and mount passwords and it creates “Private” folder auto-mounted on /home/user/Private:
Log out and back in. You will see a “Private” folder under Home. That’s it!