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 please read how to get help
Post Reply
cpcarl
Level 1
Level 1
Posts: 8
Joined: Sat Apr 13, 2019 7:21 pm

How to Encrypt Individual Files and Folders via GUI

Post by cpcarl » Sun Apr 14, 2019 10:10 pm

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?

User avatar
Lord Boltar
Level 4
Level 4
Posts: 494
Joined: Mon Jan 09, 2017 7:24 pm
Location: Sunny Florida

Re: How to Encrypt Individual Files and Folders via GUI

Post by Lord Boltar » Sun Apr 14, 2019 10:56 pm

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
IF your problem has been solved, please edit your original post and add [SOLVED] to the beginning of the Subject Line. It helps other members

The only way for evil to prosper is for good men to do nothing

Appoloin
Level 3
Level 3
Posts: 110
Joined: Sun Apr 28, 2013 3:58 am

Re: How to Encrypt Individual Files and Folders via GUI

Post by Appoloin » Mon Apr 15, 2019 6:29 am

There's Gnome Encfs Manager

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

cpcarl
Level 1
Level 1
Posts: 8
Joined: Sat Apr 13, 2019 7:21 pm

Re: How to Encrypt Individual Files and Folders via GUI

Post by cpcarl » Mon Apr 15, 2019 6:06 pm

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: 110
Joined: Sun Apr 28, 2013 3:58 am

Re: How to Encrypt Individual Files and Folders via GUI

Post by Appoloin » Mon Apr 15, 2019 6:15 pm

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

User avatar
Lord Boltar
Level 4
Level 4
Posts: 494
Joined: Mon Jan 09, 2017 7:24 pm
Location: Sunny Florida

Re: How to Encrypt Individual Files and Folders via GUI

Post by Lord Boltar » Tue Apr 16, 2019 8:17 pm

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
IF your problem has been solved, please edit your original post and add [SOLVED] to the beginning of the Subject Line. It helps other members

The only way for evil to prosper is for good men to do nothing

cpcarl
Level 1
Level 1
Posts: 8
Joined: Sat Apr 13, 2019 7:21 pm

Re: How to Encrypt Individual Files and Folders via GUI

Post by cpcarl » Tue Apr 16, 2019 11:24 pm

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?

User avatar
pbear
Level 6
Level 6
Posts: 1087
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: How to Encrypt Individual Files and Folders via GUI

Post by pbear » Wed Apr 17, 2019 1:35 am

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.
Time flies like an arrow. Fruit flies like a banana.
If your problem has been solved, please edit the thread title.

gm10
Level 16
Level 16
Posts: 6258
Joined: Thu Jun 21, 2018 5:11 pm

Re: How to Encrypt Individual Files and Folders via GUI

Post by gm10 » Wed Apr 17, 2019 3:52 am

All the default file managers allow for custom scripting ("actions") to do whatever you want them to.

User avatar
catweazel
Level 18
Level 18
Posts: 8635
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 » Wed Apr 17, 2019 4:34 am

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.
¡uʍop ǝpısdn sı buıɥʇʎɹǝʌǝ os ɐıןɐɹʇsnɐ ɯoɹɟ ɯ,ı

User avatar
AndyMH
Level 7
Level 7
Posts: 1644
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: How to Encrypt Individual Files and Folders via GUI

Post by AndyMH » Wed Apr 17, 2019 6:09 am

I use both the Gnome Encfs Manager and veracrypt and they work fine for me.
Homebrew i5-8400+GTX1080 Cinnamon 19.0, Thinkpad T430 i7-3632 Cinnamon 19.0, Thinkpad T420 Cinnamon 18.3, Thinkpad T410 Cinnamon 17.3, Thinkpad T60 19.0 Mate

User avatar
phd21
Level 18
Level 18
Posts: 8362
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: How to Encrypt Individual Files and Folders via GUI

Post by phd21 » Wed Apr 17, 2019 1:12 pm

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 KDE 18.3 & 19, 64-bit Awesome OS, Ancient Dell OptiPlex 780 Core2Duo E8400 3GHz,4gb Ram,256gb SDD, Video: Intel 4 Graphics, DVD Lightscribe. Why I use KDE?:https://opensource.com/life/15/4/9-reasons-to-use-kde

cpcarl
Level 1
Level 1
Posts: 8
Joined: Sat Apr 13, 2019 7:21 pm

Re: How to Encrypt Individual Files and Folders via GUI

Post by cpcarl » Sat Apr 20, 2019 12:32 am

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 18
Level 18
Posts: 8635
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 » Sat Apr 20, 2019 1:17 am

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.
¡uʍop ǝpısdn sı buıɥʇʎɹǝʌǝ os ɐıןɐɹʇsnɐ ɯoɹɟ ɯ,ı

Post Reply

Return to “Other topics”