password for certain folder(s) [SOLVED]

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
User avatar
52ROSt
Level 4
Level 4
Posts: 425
Joined: Mon Apr 14, 2014 10:01 am

password for certain folder(s) [SOLVED]

Post by 52ROSt »

LM 17.3 KDE

I sometimes need to keep my PC open for others to use my user account but don't want them to open certain folders.

How can I set a password to open certain folders?

Thanks in advance for your help!
Last edited by 52ROSt on Wed Sep 14, 2016 1:33 am, edited 1 time in total.

User avatar
xenopeek
Level 24
Level 24
Posts: 24279
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: password for certain folder(s)

Post by xenopeek »

I don't think there is an easy way to achieve that. Whatever solution would work for this would mean you'd have to remember a secondary password for your account, one that unlocks said directories. You'd have to remember to lock those directories before letting somebody else use your account.

A much better approach would be to create a new user account for guests (a normal account; that isn't member of sudo, admin, or adm groups). Change the permissions on your own home directory so only you have access to it. Now anytime a guest needs to use your computer you just use switch user from the menu and log them into the guest account. They won't be able to access your personal files or make modifications to your system. Once they are done logout from the guest account and you can login back to your own account and any programs you had running are still there.
Image

User avatar
52ROSt
Level 4
Level 4
Posts: 425
Joined: Mon Apr 14, 2014 10:01 am

Re: password for certain folder(s)

Post by 52ROSt »

Thanks for your explanations. I was already afraid that I only can work with a guest account.

And I don't kill the messenger of bad news!

Have a nice day.

Cosmo.
Level 23
Level 23
Posts: 17827
Joined: Sat Dec 06, 2014 7:34 am

Re: password for certain folder(s) [SOLVED]

Post by Cosmo. »

You can encrypt certain folders with encfs. There is a comfortable GUI or that: The Gnome Encfs Manager; you need this PPA: ppa:gencfsm/ppa

Now you can encrypt the folders in question an get access to them with the Manager. As long as the folders are locked nobody has access to them, even from inside of your account.

User avatar
xenopeek
Level 24
Level 24
Posts: 24279
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: password for certain folder(s) [SOLVED]

Post by xenopeek »

Needing a second password and needing to remember to lock said directories before you let somebody else use your computer still sounds more inconvenient to me than using switch user & a guest account. You can probably do similar things with eCryptfs or TrueCrypt like software.
Image

User avatar
52ROSt
Level 4
Level 4
Posts: 425
Joined: Mon Apr 14, 2014 10:01 am

Re: password for certain folder(s) [SOLVED]

Post by 52ROSt »

Thanks for the hint with both applications. I will have a look at them.

Dyfi
Level 4
Level 4
Posts: 242
Joined: Fri Nov 27, 2009 7:25 am

Re: password for certain folder(s) [SOLVED]

Post by Dyfi »

ccrypt will encrypt the contents recursively of a folder. The folder will still open but the contents will not.

User avatar
52ROSt
Level 4
Level 4
Posts: 425
Joined: Mon Apr 14, 2014 10:01 am

Re: password for certain folder(s) [SOLVED]

Post by 52ROSt »

Thanks also for the comment about ccrypt.

I will create a VM with LM 17.3 KDE inside and test all ideas I got here.

Thanks to all of you.

FreedomTruth
Level 4
Level 4
Posts: 432
Joined: Fri Sep 23, 2016 10:19 am

Re: password for certain folder(s) [SOLVED]

Post by FreedomTruth »

I know it's already marked as "solved" but maybe a simpler solution would be to change the owner of the folder(s) to root, and change folder permissions to deny rwx for everyone else. Just a thought.
If you abide in My word, you are My disciples indeed. And you shall know the truth, and the truth shall make you free... Most assuredly, I say to you, whoever commits sin is a slave of sin... Therefore if the Son makes you free, you shall be free indeed.

Cosmo.
Level 23
Level 23
Posts: 17827
Joined: Sat Dec 06, 2014 7:34 am

Re: password for certain folder(s) [SOLVED]

Post by Cosmo. »

Not a good thought and really not needed. You can change the permissions, but there is no need to change the ownership. Only the owner (or root) can change the permissions, otherwise permission limitations would not make the least sense.

User avatar
kukamuumuka
Level 16
Level 16
Posts: 6234
Joined: Tue Sep 03, 2013 4:51 am
Location: Finland
Contact:

Re: password for certain folder(s) [SOLVED]

Post by kukamuumuka »

Cryptkeeper and Gnome Encfs Manager are programs for encrypted folders.

With Cryptkeeper you need to downgrade the version, because the new one is buggy.
http://puolanka.info/distrowatch/cryptk ... ntu-14-04/

User avatar
52ROSt
Level 4
Level 4
Posts: 425
Joined: Mon Apr 14, 2014 10:01 am

Re: password for certain folder(s) [SOLVED]

Post by 52ROSt »

Thanks for all additional comments!

Post Reply

Return to “Newbie Questions”