How to Encrypt Individual Files and Folders via GUI

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
cpcarl

How to Encrypt Individual Files and Folders via GUI

Post by cpcarl »

I'm going to install Mint on a 120GB SSD and move my Home directory to a second 1TB HDD. I've found that encrypting the entire 1TB HDD, or encrypting the entire Home directory is a major headache. So I've decided that just encrypting particular files/folders in the Home directory will be sufficient. I don't need everything encrypted, just the important stuff. I thought that this would be a lot easier to implement in Mint via the GUI but am finding this not to be the case.

I want to right-click on a folder and have an option to encrypt it, and have found many tutorials on the Internet for how to accomplish this but it is not working for me in testing. All those tutorials say to install seahorse-nautilus and seahorse-plugins, and after a restart I should see an 'Encrypt' option appear on the menu when I right-click on a file or folder. That's not happening.

So, how does one enable file/folder encryption in Mint via the GUI? What am I missing?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Lord Boltar

Re: How to Encrypt Individual Files and Folders via GUI

Post by Lord Boltar »

Check out eCryptFS

http://ecryptfs.org/

and File Lock PEA but it needs Java runtime installed to work

https://eck.cologne/peafactory/en/html/file_pea.html

hope this helps

There use be a program called CryptKeeper but I do not know if it is supported or not any longer
Appoloin
Level 3
Level 3
Posts: 174
Joined: Sun Apr 28, 2013 3:58 am

Re: How to Encrypt Individual Files and Folders via GUI

Post by Appoloin »

There's Gnome Encfs Manager

https://moritzmolch.com/apps/gencfsm/
cpcarl

Re: How to Encrypt Individual Files and Folders via GUI

Post by cpcarl »

Thanks for the information. Being new to encryption on Linux I seem to be a little confused on exactly how it works.

So, for example, in Windows, using EFS, when I encrypt a folder, not only are all of the files in the folder encrypted, but any new files saved to the folder will be automatically encrypted as well. That doesn't appear to be the case in Mint. Is that right?

When encrypting a file in Mint an encrypted copy of the file is created, also leaving an unencrypted copy in the folder. Is that supposed to happen? That seems REALLY strange to me. What am I supposed to do, just remember to delete the left-over unencrypted original file? What if I get distracted and forget? That doesn't seem safe. Why isn't the encrypted copy created and then the old copy it was encrypted from automatically deleted from the system by the encryption program?
Appoloin
Level 3
Level 3
Posts: 174
Joined: Sun Apr 28, 2013 3:58 am

Re: How to Encrypt Individual Files and Folders via GUI

Post by Appoloin »

Take a look at Gnome Encfs Manager, this mounts an fake drive and any folders or files you place on this drive are encrypted.
Lord Boltar

Re: How to Encrypt Individual Files and Folders via GUI

Post by Lord Boltar »

A simple way to encrypt a single file is with openssl:

Code: Select all

openssl des3 < youfile.txt > yourfile.txt.des3
This will prompt you for a passphrase, which you will need to enter later when decrypting the file.

Code: Select all

openssl des3 -d < yourfile.txt.des3 > yourfile.txt.decrypted
cpcarl

Re: How to Encrypt Individual Files and Folders via GUI

Post by cpcarl »

Using GPG to encrypt files via the GUI (right-click and selecting 'Encrypt') just makes an encrypted copy of the original file, while leaving the original file unencrypted in the directory. WOW! Is it just me or is that a totally fatal flaw? Let's say I have a directory with 200 files in it that I want to encrypt. I right-click on the folder and encrypt all of the files within. Now I have 400 files in the folder; the 200 encrypted copies and the 200 unencrypted originals. confused?!?! Who was the genius who thought that this was how this should work in Linux? Why does GPG have to make an encrypted copy of the file instead of just encrypting the original?

I REALLY want to move to Mint from Windows, but stuff like this is totally maddening, and gives me pause. Am I missing some other option that will just encrypt the original file instead of creating an encrypted copy of the file in Linux? I don't want to create hidden encrypted folders and what not that can be done with other utilities; I just want to encrypt files without leaving behind unencrypted copies. Is this possible via a GUI tool in Linux?
pbear
Level 16
Level 16
Posts: 6569
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: How to Encrypt Individual Files and Folders via GUI

Post by pbear »

Pretty funny. You've now invested about ten times as much effort as it would have taken to learn how to encrypt your home folder on a separate partition. And, no, they're not going to redesign Linux per your specifications. It's an "as is, no warranties" product.

ETA: For context, the OP's prior thread.
Last edited by pbear on Wed Apr 17, 2019 11:34 am, edited 2 times in total.
gm10

Re: How to Encrypt Individual Files and Folders via GUI

Post by gm10 »

All the default file managers allow for custom scripting ("actions") to do whatever you want them to.
User avatar
catweazel
Level 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: How to Encrypt Individual Files and Folders via GUI

Post by catweazel »

cpcarl wrote: Tue Apr 16, 2019 11:24 pm ... WOW! Is it just me or is that a totally fatal flaw? ... confused?!?! Who was the genius who thought that this was how this should work in Linux? Why does GPG have to make an encrypted copy of the file instead of just encrypting the original?

... I don't want to create hidden encrypted folders and what not that can be done with other utilities; I just want to encrypt files without leaving behind unencrypted copies. Is this possible via a GUI tool in Linux?
VeraCrypt.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
User avatar
AndyMH
Level 21
Level 21
Posts: 13759
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: How to Encrypt Individual Files and Folders via GUI

Post by AndyMH »

I use both the Gnome Encfs Manager and veracrypt and they work fine for me.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
phd21
Level 20
Level 20
Posts: 10104
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: How to Encrypt Individual Files and Folders via GUI

Post by phd21 »

Hi cpcarl,

Welcome to the wonderful world of Linux Mint and its excellent forum!

I just read your post and the good replies to it. Here are my thoughts on this as well.

It would help to know more about your system setup. If you run "inxi -Fxzd" and "lsusb" from the console terminal prompt, highlight the results, copy and paste them back here, that should provide enough information.
cpcarl wrote:I'm going to install Mint on a 120GB SSD and move my Home directory to a second 1TB HDD. I've found that encrypting the entire 1TB HDD, or encrypting the entire Home directory is a major headache.
Encrypting your Home folder is simple if you select that option during the installation of Linux Mint. I do not see the advantage of moving your Home directory to another drive?
cpcarl wrote:So I've decided that just encrypting particular files/folders in the Home directory will be sufficient. I don't need everything encrypted, just the important stuff. I thought that this would be a lot easier to implement in Mint via the GUI but am finding this not to be the case.
File encryption ideas for newbies - Linux Mint Forums
viewtopic.php?f=90&t=279706&hilit=encrypt

cpcarl wrote:I want to right-click on a folder and have an option to encrypt it, and have found many tutorials on the Internet for how to accomplish this but it is not working for me in testing. All those tutorials say to install seahorse-nautilus and seahorse-plugins, and after a restart I should see an 'Encrypt' option appear on the menu when I right-click on a file or folder. That's not happening. So, how does one enable file/folder encryption in Mint via the GUI? What am I missing?
As you already know, there are various options for encrypting folders and or files and or drives and their partitions.

One of the easiest options is to install "p7zip-full" from the "Synaptic Package Manager (SPM)" and just right-click a folder or file(s) from your file manager and use archive "compression" with password encryption, use the "move" option to remove the original files after archiving (compressing). "PeaZip" is another wonderful archiving application that can be installed in Linux Mint.

You can also you use your GPG encryption key (easily create one if you do not have one) and use various applications and or applets to encrypt files and or folders. (GPA, KGpg, Kelopatra, etc...)

The "disks" application can easily encrypt a drive's partition or a USB stick.

(Solved)How to install Veracrypt - Linux Mint Forums
viewtopic.php?f=90&t=275495&hilit=encrypt

SiriKali works on Linux, macOS and Microsoft Windows Operating Systems | SiriKali
https://mhogomchungu.github.io/sirikali/

SiriKali - Easy way to Encrypt & Decrypt folders in Linux | 2daygeek.com
https://www.2daygeek.com/sirikali-passw ... ory-linux/

Hope this helps ...
Phd21: Mint 20 Cinnamon & KDE Neon 64-bit Awesome OS's, Dell Inspiron I5 7000 (7573, quad core i5-8250U ) 2 in 1 touch screen
cpcarl

Re: How to Encrypt Individual Files and Folders via GUI

Post by cpcarl »

Thank you for all of the great responses. Being somewhat of a Linux noob I don't quite understand it all, but I'm working on it. Coming from a Windows background, encryption in Linux is totally foreign to me, so I'm trying to get a grasp on it.

What I did was install Mint on my 120GB SSD, without encryption at installation. I then moved /home to a second internal hard drive. At that point, via the GUI there is no option available to encrypt the second drive that /home resides on. 'Edit Encryption Options...' is unavailable from the "Additional partition options" menu.

So, in this scenario, how does one now encrypt the second hard drive that my /home directory now resides on in Mint. I tried this (https://www.howtogeek.com/116032/how-to ... ng-ubuntu/) in VM tests for Mint and could never set the passphrase, either via the popup that should appear or via the command line. Though in my tests with other distros I was able to get the popup and set the passphrase for the newly encrypted drive. ???
User avatar
catweazel
Level 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: How to Encrypt Individual Files and Folders via GUI

Post by catweazel »

cpcarl wrote: Sat Apr 20, 2019 12:32 am Being somewhat of a Linux noob...

...how does one now encrypt the second hard drive that my /home directory now resides on in Mint.
This isn't going to be the answer you're looking for:

If you're just experimenting then fine, that's a good way to learn, but if your data means something to you then you are likely headed for disaster. You have ignored the best advice given to you, so I will state it very plainly: Linux encryption isn't for the feint of heart. You need to know your way around Linux, especially if something goes south. There are enough posts in the forum from people who have lost data due to their lack of experience with both encryption and encrypted backup so you need to be prepared to take the risk of your lost data becoming a statistic.

As for the best advice that you've ignored, three posters have told you about VeraCrypt.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
Locked

Return to “Other topics”