how can I password-protect folder in Linux?

tazarbm

Elite Member
Executive VIP
Jr. VIP
Joined
Oct 28, 2020
Messages
11,663
Reaction score
14,617
Hi,

does someone know how I can quickly and easily (literally quickly and easily) password-protect a folder in Linux Mint?

I google for a solution and every site that I found wants me to use the terminal or install god-knows what applications, which is pure insanity as in WIndows you used to right-mouse-click on the folder, choose "password" and just type in the password, and it worked for basic level protection that I needed. And I see no reason why this (arguably) advanced OS (Linux) can't do the same, but alas, nobody seems to know how to do it (by the way, I'm using the Nemo file manager, probably this info matters)

I swear to God, Linux community intentionally keeps this OS complicated and convoluted as hell just so they can be the only ones to know how to use it and stick our eyes with how much superior they are to us, the plebes. I'm getting so fed up with this OS like you guys can't imagine, but I have no other choice at the moment since Windows has become malware so I had to stop using it...

Anyway, please - if any of you Linux pros - know how to do this basic task, please let me know as my nephew will visit me tomorrow and he'll most likely want to stay at the computer (like he usually does when he visits me), so I need to password-protect my work folder so that the little rascal doesn't delete anything by accident...
 
Hi,

does someone know how I can quickly and easily (literally quickly and easily) password-protect a folder in Linux Mint?

I google for a solution and every site that I found wants me to use the terminal or install god-knows what applications, which is pure insanity as in WIndows you used to right-mouse-click on the folder, choose "password" and just type in the password, and it worked for basic level protection that I needed. And I see no reason why this (arguably) advanced OS (Linux) can't do the same, but alas, nobody seems to know how to do it (by the way, I'm using the Nemo file manager, probably this info matters)

I swear to God, Linux community intentionally keeps this OS complicated and convoluted as hell just so they can be the only ones to know how to use it and stick our eyes with how much superior they are to us, the plebes. I'm getting so fed up with this OS like you guys can't imagine, but I have no other choice at the moment since Windows has become malware so I had to stop using it...

Anyway, please - if any of you Linux pros - know how to do this basic task, please let me know as my nephew will visit me tomorrow and he'll most likely want to stay at the computer (like he usually does when he visits me), so I need to password-protect my work folder so that the little rascal doesn't delete anything by accident...
Easiest way is to create a password-protected zip of the folder. Right-click the folder in Nemo, choose “Compress,” select zip format, and set a password. Then delete or move the original folder.
 
Easiest way is to create a password-protected zip of the folder. Right-click the folder in Nemo, choose “Compress,” select zip format, and set a password. Then delete or move the original folder.
I saw that option, but I still want to be able to access the folder myself between breaks, so I don't want to wait 10-15 minutes for the entire folder to be compressed and decompressed every hour for the entire day.

Is there no simpler option that doesn't require archiving? Like, genuinely just right-click, choose password, type password in, done! I refuse to believe that Linux can't do a single thing simpler than Windows...

Thanks for the tip, though! Keep them coming if you have more :)
 
Hey brother, how are you? Try installing WinRAR; Vine usually works with it. I use older versions of WinRAR and BitTorrent.
 
Hi,

does someone know how I can quickly and easily (literally quickly and easily) password-protect a folder in Linux Mint?

I google for a solution and every site that I found wants me to use the terminal or install god-knows what applications, which is pure insanity as in WIndows you used to right-mouse-click on the folder, choose "password" and just type in the password, and it worked for basic level protection that I needed. And I see no reason why this (arguably) advanced OS (Linux) can't do the same, but alas, nobody seems to know how to do it (by the way, I'm using the Nemo file manager, probably this info matters)

I swear to God, Linux community intentionally keeps this OS complicated and convoluted as hell just so they can be the only ones to know how to use it and stick our eyes with how much superior they are to us, the plebes. I'm getting so fed up with this OS like you guys can't imagine, but I have no other choice at the moment since Windows has become malware so I had to stop using it...

Anyway, please - if any of you Linux pros - know how to do this basic task, please let me know as my nephew will visit me tomorrow and he'll most likely want to stay at the computer (like he usually does when he visits me), so I need to password-protect my work folder so that the little rascal doesn't delete anything by accident...
I totally feel your frustration. The Linux community can sometimes be overly obsessed with the terminal when all we want is a simple click. Don't worry, you don't need the terminal for this, and since your nephew arrives tomorrow, here is the fastest, easiest "Windows-style" way to lock it right now using Nemo:Instead of locking the "folder" directly, we compress and password-protect it:Right-click on your work folder.Select "Compress..." from the menu.In the pop-up window, choose .zip or .7z as the format.Click on "Other Options" (or the advanced settings expansion at the bottom).Type your password in the Password field.Click Create.Now you have a password-protected file. Delete the original unencrypted folder (or move it to a USB drive temporarily), and your nephew won't be able to open or delete your files inside the archive without the password. When you need to work, just double-click it, type the password, and extract it.Hang in there! Windows has its issues, but you can definitely tamed Linux Mint without becoming a programmer.
 
I get your frustration, but for your specific problem, you probably don't need a complicated encryption setup. The easiest solution is to create a separate user account for your nephew and let him use that when he visits. Your work files will stay inaccessible to him unless he knows your password, and you don't have to mess with the terminal or install random software.

For a one-time visit, that seems much simpler than trying to password-protect individual folders.
 
You could use LUKS on a container (file), and bind mount it into a folder. You just create an all zeroes file of the size you want, luksFormat it, then luksOpen it with your password, mkfs.ext4 it, luksClose it, then you are good to go. Next time you want to open it, you just luksOpen it and, after it appears in /dev/mapper, you just bind mount that into the folder you want, on your home for example.

This might be overkill (using luks), but I think it's also the cleanest way of doing it. You could simplify it a bit by having a bash script that asks you for the password and bind mounts it automatically. On any decent window manager you could even bind some key combinations to call that script, or unmount it too.

Poke me if you need any help with this.
 
You can use VeraCrypt to encrypt one folder. The best is reinstall your Linux and enable LUKS. Then your whole disk is encrypted and you are safe.
 
Oh, I just read what your specific problem was. If it's merely a separation of users/concerns, then yes, like @CodeMason suggests, different user accounts are the easiest solutions. You can even keep several of them opened at the same time on different TTYs, and switch between them.

I used this setup when I was working as a contractor to avoid any chance of sending the wrong file to the wrong person or messing my work in any way. Then expanded it to a coding dedicated account only, or a 3D printer one, which was not such a good idea. I turned something easy into something complicated.
 
Hi,

does someone know how I can quickly and easily (literally quickly and easily) password-protect a folder in Linux Mint?

I google for a solution and every site that I found wants me to use the terminal or install god-knows what applications, which is pure insanity as in WIndows you used to right-mouse-click on the folder, choose "password" and just type in the password, and it worked for basic level protection that I needed. And I see no reason why this (arguably) advanced OS (Linux) can't do the same, but alas, nobody seems to know how to do it (by the way, I'm using the Nemo file manager, probably this info matters)

I swear to God, Linux community intentionally keeps this OS complicated and convoluted as hell just so they can be the only ones to know how to use it and stick our eyes with how much superior they are to us, the plebes. I'm getting so fed up with this OS like you guys can't imagine, but I have no other choice at the moment since Windows has become malware so I had to stop using it...

Anyway, please - if any of you Linux pros - know how to do this basic task, please let me know as my nephew will visit me tomorrow and he'll most likely want to stay at the computer (like he usually does when he visits me), so I need to password-protect my work folder so that the little rascal doesn't delete anything by accident...
Hi

You're facing the basic day to day linux "complicated way" of achieving things. Indeed the same wall you will face many many times with using Linux. I'm not sure why you use it in the first place to be honest. If it is for personal use, simply accept that you will need to go every time to AI asking how can you do what you want to achieve. After you've found the way of doing that, you can ask the AI to make a keybinding or something like that so in case you need to perform the same operation again, it will not be that hard.

I understand your frustration. Everything on windows seems easier at the first glance. Specially the day-to-day tasks/operations. That is what Windows has been created for. Ease of UX/permitting more people to use a computer without needing 5+ commands in terminal to only add a password to a folder haha. But Windows also is way overbloated.


So I suggest you either have patience in going back and forth with these kind of small tasks or simply use Windows (Or, if you really like linux and want to use it, use Ubuntu. it has much easier UX while still being linux)

Another solution of course as mentioned here is to create a separate user just for nephew/anybody else. But that's a workaround to your problem.

Later Edit: I just searched for Linux Mint and is almost the same if not better UX than Ubuntu. So don't consider moving to ubuntu
 
Last edited:
Back
Top