2024 Forfatter: Peter John Melton | [email protected]. Sidst ændret: 2024-01-15 03:55
Dagens Spørgsmål & Svar session kommer til os med venlig hilsen af SuperUser-en underafdeling af Stack Exchange, en community-driven gruppe af Q & A-websteder.
Foto med tilladelse til Nathan Meijer (Flickr).
Spørgsmålet
SuperUser-læser Zane Woodard vil vide, hvordan man kan passwordbeskytte en mappe på Linux / Unix uden kryptering:
I have searched around quite a bit for either a built-in feature or program to do this, but had no luck. I want to password protect a folder, but do not want to encrypt it.
The security of the contents of the folder is not important, the password would just act as a deterrent to somebody attempting to access the contents of the folder from my computer. Think of it like a password lock on a computer, if you were to remove the hard-drive, you could easily take all the files the user had, but the password is still a deterrent to people accessing the contents of the drive.
Two main reasons for not using encryption here are:
- Decreased performance for opening files.
- Encryption prevents the contents from being indexed/searchable.
Is anybody aware of a solution?
Er der en nem løsning, som Zane kunne bruge til at kodeordbeskytte sin mappe?
Svaret
SuperUser bidragsydere R Schultz og Bodo Thiesen har svaret for os. Først op, R Schultz:
The easiest way would be to change the permissions of the files so that they are not readable by anyone other than the owner. Once that is done, a user would have to either log in as you (which should require a password) or sudo as root (which should also require a password). To change the permissions, simply use the following command on any files you do not want others to have access to.
chmod og-rwx filename
This assumes that when you are not at your computer, your screen is locked and there is a password for your account as well as the root account.
Efterfulgt af svaret fra Bodo Thiesen:
Create a new user for these protected files and/or directories. Then replace $newuser with the new user account name:
- chown $newuser filename directoryname
- chmod og-rwx filename directoryname
This way, the files and directories are safe even if you do not log out and have your screen unlocked for some reason.
Har du noget at tilføje til forklaringen? Ik anyik notk not notikkkkkk not not noting notkfikik not any anyik any for anyik notikikinging not Vil du læse flere svar fra andre tech-savvy Stack Exchange brugere? Tjek den fulde diskussionstråd her.
Anbefalede:
Hvordan kan du inficeres via din browser og hvordan man beskytter dig selv
I en perfekt verden ville der ikke være nogen måde for din computer at blive inficeret via din browser. Browsere skal køre websider i en usikker sandkasse og isolere dem fra resten af computeren. Desværre sker det ikke altid.
Sikre din Gmail-konto med SSL-kryptering uden at bryde Gmail Notifier
Uanset hvilken firewall du bruger, hvis du forbinder til tjenester online uden at bruge kryptering, er der en chance for dine data at blive kapret, især hvis du opretter forbindelse via et trådløst netværk. I dag viser vi dig, hvordan du tænder SSL for Gmail, mens du stadig tillader, at Gmail Notifier fungerer korrekt.
Hvordan Attackers faktisk "Hack Accounts" online og hvordan man beskytter dig selv
Folk taler om, at deres online-konti bliver "hacket", men hvordan sker netop denne hacking? Virkeligheden er, at konti er hacket på forholdsvis enkle måder - angriberne bruger ikke sort magi.
Gendan WiFi Password i Windows med WiFi Password Dump & WiFi Password Decryptor
WiFi Password Dump & WiFi Password Decryptor er to freeware, der hjælper dig med at gendanne glemte Wi-Fi-adgangskoder i Windows 8 | 7. Download dem gratis.
Hvad er Catroot & Catroot2 mappe? Hvordan nulstiller du catroot2 mappe
Dette indlæg forklarer, hvad der er Catroot & Catroot2 mapper og hvordan du kan nulstille catroot2 mappen i Windows. Du må ikke slette eller omdøbe disse mapper.