Password protect a folder

Message
Author
Klaas Vaak
Posts: 144
Joined: Mon Dec 10, 2018 1:50 pm

Password protect a folder

#1 Post by Klaas Vaak »

I am running MX as a guest on a Windows host on my home PC. I am the only user, there are no groups. I have folder that I want to protect with a password in such a way that when a program tries to open it, a prompt pops up requesting a password.

So what I did was I created a new user with

Code: Select all

sudo useradd newuser
the newuser being the name of the newly created user.

I then changed ownership of the folder as follows:

Code: Select all

sudo chown -R newuser /home/path/folder
I allocated a password to newuser as follows:

Code: Select all

sudo passwd newuser
and followed the prompts
Next I gave that folder permissions as follows:

Code: Select all

sudo chmod newuser u+rwx,go-rwx /home/path/folder
When I then go to the folder it shown with a black cross on it; clicking on it gives a pop-up message that access is denied, there is not prompt for a password.
Moreover, when I right-click on it and then click on "Ownership to user", there is a prompt for a password, and filling in my password unblocks the folder.

So, I am doing something wrong, but I can't figure it out.

User avatar
PondLife
Posts: 68
Joined: Wed May 09, 2018 12:24 pm

Re: Password protect a folder

#2 Post by PondLife »

Would it not be easier to install something like “ccrypt” which would allow you to encrypt the folder with a password.

Klaas Vaak
Posts: 144
Joined: Mon Dec 10, 2018 1:50 pm

Re: Password protect a folder

#3 Post by Klaas Vaak »

@PondLife: I had actually downloaded ccrypt, but I read that encrypting a file can slow it down in unencrypted form, so I refrained from using it. Do you have experience with ccrypt?

Edit:ccrypt only works for files, not directories.
Last edited by Klaas Vaak on Thu Dec 20, 2018 4:34 am, edited 1 time in total.

User avatar
BitJam
Developer
Posts: 2283
Joined: Sat Aug 22, 2009 11:36 pm

Re: Password protect a folder

#4 Post by BitJam »

@Klaas Vaak, you probably want something like SikrKali or ZuluCrypt which are gui frontends for encrypted file systems like encfs or cryfs. These will be good enough to keep out family members but not the NSA. If you want to keep the NSA out then you should encrypt an entire partition with LUKS and use a good passphrase. MX offers encrypted installs and encrypted live-usbs which use LUKS and can keep out the NSA (as far as we know).
"The first principle is that you must not fool yourself -- and you are the easiest person to fool."

-- Richard Feynman

User avatar
PondLife
Posts: 68
Joined: Wed May 09, 2018 12:24 pm

Re: Password protect a folder

#5 Post by PondLife »

@PondLife: I had actually downloaded ccrypt, but I read that encrypting a file can slow it down in unencrypted form, so I refrained from using it. Do you have experience with ccrypt?

Edit:ccrypt only works for files, not directories.
That's correct I remembered this too late last night, was hoping to sneak on and correct it this morning before you had seen the post but too late again! Must check these things before posting in future.

Klaas Vaak
Posts: 144
Joined: Mon Dec 10, 2018 1:50 pm

Re: Password protect a folder

#6 Post by Klaas Vaak »

@BitJam: thank you, I'll have a look.

Klaas Vaak
Posts: 144
Joined: Mon Dec 10, 2018 1:50 pm

Re: Password protect a folder

#7 Post by Klaas Vaak »

That's correct I remembered this too late last night, was hoping to sneak on and correct it this morning before you had seen the post but too late again! Must check these things before posting in future.
No worries :-)

nathan2423
Posts: 217
Joined: Tue Dec 22, 2015 8:33 am

Re: Password protect a folder

#8 Post by nathan2423 »

This is a subject of great interest to me. Sikrkali looks very interesting, but I have also been looking at cryptomator https://cryptomator.org without going in any direction yet.

There seem to be many different considerations and advantages / disadvantages to all the options.

One consideration I have is that if the process is not very easy, not much more than a password, I am not going to be able to discipline myself to use it.

Cryptomator, however, seems to be perhaps the best organized and presented on the web, has an Android app, etc.

Does anyone have any viewpoint or recommendations on cryptomator vs competitive options that would be helpful?

Thanks

nathan2423
Posts: 217
Joined: Tue Dec 22, 2015 8:33 am

Re: Password protect a folder

#9 Post by nathan2423 »

I now see this comparison chart, which looks very helpful, but the choices are still bewildering -- https://nuetzlich.net/gocryptfs/comparison/

Klaas Vaak
Posts: 144
Joined: Mon Dec 10, 2018 1:50 pm

Re: Password protect a folder

#10 Post by Klaas Vaak »

@Nathan2423: form what I gather from the Cryptomator website and the comparison website, Cryptomator is a file encryption app, whereas I am looking for a folder encryption app.

For file encryption ccrypt seems sufficient: light weight, easy to encrypt and decrypt via the Terminal. I have tried on a test file, but have not used on an ongoing basis.

Post Reply

Return to “General”