How to Easily Create An Encrypted Directory in Ubuntu

If you are using Ubuntu and you have some private documents that you don’t want them to be publicly accessible. What should you do? One of the way is to encrypt your document. While you can encrypt individual files in Nautilus, one of the better way is to create an encrypted directory in Ubuntu and store all your confidential files in this folder. It may seems complicated, but with Gnome Encfs Manager, it turns out to be an easy task.

The Gnome Encfs Manager is an easy to use manager that allows you to create and mount encrypted directory in Ubuntu. It makes use of the EncFS cryptography to encrypt the folder and comes with support for Gnome Keyring and appindicator. This is very useful if you are looking to encrypt your files in Dropbox.

Installation

Open a terminal and install from the following PPA:

sudo add-apt-repository ppa:gencfsm
sudo apt-get update
sudo apt-get install gnome-encfs-manager

Creating Encrypted Directory in Ubuntu

In the application, click the first icon in the menu bar. This will create a new stash.

Create new encrypted directory in Ubuntu using Gnome Encfs Manager

Select the location where you want to create the encrypted directory. Note that the default is “~/Encfs/.Crypt“, but you can choose to change to another location. For this tutorial, I will be using the “~/Encrypted” folder.

Options for creating encrypted directory in Ubuntu

Notice that the mount location is not the same as the Encrypted directory. The Mount directory is where you can access the decrypted file. It cannot be the same as the encrypted directory.

Lastly, enter the password and click “Create”.

Once the encrypted directory is created, it will show up in the application window.

gencfsm-window-with-new-entry

Now, all you need to do is to save your files and documents into the Mount directory (in this case “~/EncFS/Encrypted”) and it will automatically encrypt the file. This is what you will see in both the encrypted folder and the mounted folder.

gencfsm-encrypted-file

To unmount the Encrypted folder, just uncheck the “Mounted” box in the Gnome Encfs Manager window.

gencfsm-unmount-folder

Configuring stash

When you configure the stash in gencfsm, you can get the manager to mount the stash on startup and whether to allow other users to access the stash. You can also get it to auto unmount when it is idle for a certain amount of time. The additional option include whether to save the password in keyring and to show this entry in the indicator menu.

gencfsm-configure-stash

Deleting your encrypted directory

To delete an encrypted directory in Ubuntu, you just have to select the entry in the Gnome Encfs Manager window and click the Delete icon. You will have to select if you want to only remove the entry from the manager or completely remove the encrypted folder. Note that if you select the first option, you can add it back later by following the creation method as mentioned above.

gencfsm-delete-stash

if you select the second option, you will have to check the next box “Yes, I am sure and aware that I could lose my data“. That warning alone should be sufficient to inform you the consequences of deleting the encrypted folder.

Last but not least, I would advise you to go to the Preferences section and set Gnome Encfs Manager to automatically start on login. You can also configure it to unmount all stashes on logout.

gencfsm-preferences

Conclusion

There are many ways to encrypt your files/folders in Ubuntu, and Gnome Encfs Manager is one of the easiest I have ever seen. There is little configuration required and it just works. If you have a need to encrypt your files, I would strongly recommend Gnome Encfs Manager. Try it out and let us know if it is useful for you.

Image credit: “confidential” Stamp On Folders by BigStockPhoto

Damien
Damien

Damien Oh started writing tech articles since 2007 and has over 10 years of experience in the tech industry. He is proficient in Windows, Linux, Mac, Android and iOS, and worked as a part time WordPress Developer. He is currently the owner and Editor-in-Chief of Make Tech Easier.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox