password protect folder in linux

How to Password Protect Folders in Linux

Sometimes you may want to password protect folders & directories in Linux, in case you need to store sensitive information in them. Such protection secures these folders from unauthorized access even if they get access to your computer. Cryptkeeper is a simple app that manages encrypted folders. In this article, we will look at how to password protect folders in Linux.


How to Password Protect Folders in Linux

Here are the steps to password protect folders in Linux.


1. Install Cryptkeeper

Open terminal and run the following command to install cryptkeeper in Linux.

RHEL/Fedora/CentOS

$ sudo yum install cryptkeeper

Ubuntu/Debian

Please note, cryptkeeper is available only until Ubuntu 18.04. From Ubuntu 20.04 onwards, it is a part of GNOME EncFS.

$ sudo apt-get install cryptkeeper


2. Open Cryptkeeper

Depending on your Linux distribution, follow these steps to open cryptkeeper.

RHEL/Fedora/CentOS

Go to Applications → System Tools → Cryptkeeper to launch Cryptkeeper.

Ubuntu/Debian

Go to Applications → System Tools → Cryptkeeper to launch Cryptkeeper.

Sometimes it may not be visible in system tray due to whitelisting policy. In such cases, open terminal and run the following command to open systray whitelist policy.

$ gsettings get com.canonical.Unity.Panel systray-whitelist

You will see the following output.

['JavaEmbeddedFrame', 'Wine', 'Update-notifier']

Run the following command to add Cryptkeeper to systray whitelist.

$ gsettings set com.canonical.Unity.Panel systray-whitelist "['JavaEmbeddedFrame', 'Wine', 'Update-notifier', 'Cryptkeeper']"


3. Encrypt Folder with CryptKeeper

Once it is started, Cryptkeeper will be visible on system tray on top right/bottom right corner. Click on its icon and choose ‘New encrypted folder’ to create new encrypted folder.

Choose the folder by typing its name or navigating to it.

Enter password and confirm it. Click on Forward button to proceed. It will encrypt your folder.

To open folder, just click its name from Cryptkeeper icon.

In this article, we have learnt how to password protect folder using cryptkeeper.

Also read:

How to Restrict SSH Users to Specific Folder in Linux
How to Monitor Log Files in Real Time
Tail Command to Check Logs in Linux
How to Remove Unused Packages in Linux
How to Configure DNS Master-Slave Server in Linux

Leave a Reply

Your email address will not be published. Required fields are marked *