Password Protect Folders In Linux


Table of Contents

Most of the time, having a password-protected user is all you need to keep your files private and protected from prying eyes. There are those few times when you need to allow access to your account to another person; sometimes, there are folders or files you would like to keep away from being accessed.

Now we can password-protect folders with several handy tools. In the Windows world, these tools are quite easily available for Windows, but today we will look at a few options available for the Linux user.

Password Protect Folder With Cryptkeeper

The first one on the list is Cryptkeeper. Cryptkeeper is a popular Linux tool that can password-protect folders. This utility can easily be installed by searching for it in the Ubuntu software center in Ubuntu or the Software Manager in Linux Mint and other distros.

Cryptkeeper can also be installed with the command.

sudo apt-get install cryptkeeper encfs

​It works out of the box for Linux Mint. After installing the software, it runs in the system tray. To create an encrypted folder, click on the tray icon and select New Encrypted Folder.

cryptkeeper in linux

Type the name of the folder, select the location of the folder, and then enter your password to secure the folder. Once you are done, you will see your encrypted folder in your File Manager. You can then move your files easily into this folder, and they will be password-protected. After saving your files, you can now unmount the folder with the following command.

$ sudo fusermount -u /home/sk/unixmen/ENCRYPTED FOLDER
encfs password protect folder in linux

To access your files, you have to mount the folder from Cryptkeeper and then enter your password. You can now access and edit files in the folder. If you already have an EncFS folder, you can also import it into Cryptkeeper. You can easily delete or change the password for your EncFS folder in Cryptkeeper.

encfs linux folder lock

Gnome Encfs Manager

Another great Linux tool for creating password-protected folders is the Gnome Encfs Manager. Gnome Encfs Manager can be installed with the following command in Ubuntu and other Ubuntu-based distros.

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

Gnome Encfs Manager also comes with a system tray icon. You can easily create new or import existing Encfs folders into the manager. You can easily mount and unmount Encfs folders. It also comes with extra features compared to Cryptkeeper, such as the ability to auto-mount folders at startup. It is particularly useful if you use it with other cloud-synced folders such as Dropbox.

Gnome Encfs Manager is more or less designed to remove the hassle that can be found in Cryptkeeper.

gnome encfs manager
gnome encfs password protect folder


So there you have it, some very capable tools that allow you to password-protect folders in Linux. But then again, you can easily use a combination of a Guest account and a password-secured account to limit access to your private folders and files.

Cryptkeeper is known to have issues with some recent versions of Ubuntu, but then again, it worked flawlessly on my Linux Mint 18 test machine.

Gnome Encfs is more popular amongst Linux enthusiasts, and considering the support it has, it probably is your best Linux tool to create and manage password-protected folders.