Easily Encrypt Folders

Ecryptfs is a tool that can be used to encrypt folders, unlike other encryption methods this doesn’t require a file of a fixed size, so you can use the decrypted folder in the same way as a regular folder without worrying about space.

This tutorial will explain how you can use a plugin as a convenient way to use this tool.

Pre-installation

In order to use this plugin you will need the ecryptfs-simple program and the python3-secretstorage package.

The easiest way to install secretstorage (on Ubuntu) is to try clicking this link:
apt:python3-secretstorage

or copy this into a terminal:
sudo apt install python3-secretstorage -y

To install the ecryptfs-simple program, follow the steps here.

Installation

To install the actual plugin simply open a terminal and copy & paste these commands:

sudo apt install python-nautilus
mkdir -p ~/.local/share/nautilus-python/extensions/
cd ~/.local/share/nautilus-python/extensions/
wget https://sambull.org/downloads/ecryptfs-nautilus.py
chmod a+x ecryptfs-nautilus.py

If you want to try this out immediately, press Alt+F2 and enter nautilus -q, then repeat and enter nautilus, otherwise it will be available next time you login.

Usage

This new version has a greatly simplified and streamlined interface.

Simply right-click a folder you want to encrypt and click Encrypt folder, confirm when prompted and the contents of the folder will be immediately encrypted.

To view the decrypted contents, simply open the folder in Nautilus and it will be automatically mounted. If you want to manually unmount the folder, simply right-click and click Unmount encrypted folder.

Notes

Folders are encrypted with a randomly generated password, which is stored in your keyring. Make sure you backup your keyring, or you risk losing all your encrypted files.

If you want to move/rename a folder, you will need to update the keyring. Alternatively, create a new encrypted folder, and just copy the contents across.

Upgrading

If you’ve used the older encfs extension, you will need to re-encrypt your files, by mounting the encfs directory and copying the contents into a newly created ecryptfs directory.

Extension

I’ve written a follow-up post to this one that explains how this can be used to encrypt Firefox data seamlessly. You can read it here.

Unu penso pri “Easily Encrypt Folders

Respondi

Retpoŝtadreso ne estos publikigita. Devigaj kampoj estas markitaj *