Answer the question
In order to leave comments, you need to log in
How to put a password on a folder in linux?
there are a couple of folders not for prying eyes, but often you need to access such folders, for example, there may be a file with passwords or something like that ...
but strangers can use a computer with an active user,
there are encryption methods such as truecrypt, but if the folder is very large volume, it will be just awful how much it opens,
the same thing with archiving under a password, it takes too long to unzip.
In Windows, I still have not found a simple solution with access to a folder with a password, maybe there is a sane alternative in Linux?
Answer the question
In order to leave comments, you need to log in
Instead of a folder, a disk partition and LUKS to encrypt the partition. To mount a partition, just click on it from the file manager. When mounting, it asks for a password, a delay of two or three seconds (I didn’t detect it to be honest). To unmount the partition - a couple more clicks in the file manager. Since this is a native tool in Linux (and convenient and even without glitches), I somehow thought that everyone uses it.
Set permissions for the folder. Create a user, for example, 'Alex' and give only him rights to this folder, let it be data and located in /
1. mkdir / data
2. chown -R Alex: Alex / data
3. cmod 700 / data
If someone will want to use the folder: sudo -l Alex
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question