(Linux) File/Directory encryption instead of filesystem encryption?

1

I have problems setting up filesystem encryption (I'll be honest, it's a bit too complicated for me). Is there a feature like EFS from Windows where I can simply encrypt directory and/or files?

Kingbird

Posted 2019-09-23T16:25:22.287

Reputation: 11

1

The technology exists, but I'm unaware of a user-friendly way to do it. This answer might get you part of the way there, but the instructions it links to specifically work only for encrypting the home drive.

– jpaugh – 2019-09-23T16:28:42.253

Might also want to take a look at this (for non-rotational drive): https://unix.stackexchange.com/questions/332554/how-to-f2fs-filesystem-encryption

– Tom Yan – 2019-09-23T16:35:26.477

https://help.ubuntu.com/lts/serverguide/ecryptfs.html provides information in encrypting any filesystem you wish, and https://www.howtoforge.com/tutorial/how-to-encrypt-directories-with-ecryptfs-on-ubuntu-16-04/ describes how to encrypt a specific directory, its files, and directories and files beneath. – K7AAY – 2019-09-23T17:16:25.717

Thank you very much everyone. I'll read those and try them in a VM first :) – Kingbird – 2019-09-23T17:17:57.560

Take a look at Plasma Vaults. https://www.techrepublic.com/article/how-to-create-an-encrypted-vault-with-kde-vaults/

– Johan Myréen – 2019-09-23T18:36:59.100

Answers

1

You might want to give EncFS a try:

EncFS provides an encrypted filesystem in user-space. It runs with regular user permissions using the FUSE library. EncFS is Open Source software.

Basic usage:

$ encfs ~/.encrypted_data ~/clear_data

That will create a ~/.encrypted_data and will mount the unencrypted version as ~/clear_data (your user needs to be in the fuse group)

You only interact with ~/clear_data, and everything in that mount will be encrypted in the real directory ~/.encrypted_data

Once you are done, you can remove the unencrypted mount with:

fusermount -u ~/clear_data

Eduardo Trápani

Posted 2019-09-23T16:25:22.287

Reputation: 541