1

How do I protect my home folder contents without encrypting them? That seems like a pain for many reasons. I just learned that any program I install has read/write/execute permissions to everything in my home folder in Ubuntu.

I don't want every program that I sudo apt-get install to be able to read my \home directories and files. How do I protect them? If I install RandomJoeBlow utility I don't want it to see my personal documents I keep in my \home folder. Do I password protect my \home\photos and \home\medical_info directories? What to do?

  • 3
    No, every program you run will be run with the identity of the user that you are logged in as. If you need to run programs as a truly unprivileged user, use sudo -u nobody command_name and set the permissions on private files/directories so that "other" can't read or write to them. – Kusalananda Mar 26 '18 at 16:30
  • If you run selinux, you can put arbitrary labels on programs and files, and write rules about what can access what. See linux.die.net/man/8/mozilla_selinux for an example of how you can restrict Firefox. – Mark Plotnick Mar 26 '18 at 16:39
  • 1
    Turning the question around: What if RandomJoeBlow is the utility you use for encryption? What makes you think your encryption utility is safer to use than any other utility that you install from your distribution? The answer is probably applicable to any other utility that you install. – Kusalananda Mar 26 '18 at 17:01
  • 1
    sudo chmod 700 /home/* ... root always has access to everything, so if a program is running as root or with root permissions, the only way to prevent root from reading a file or directory is to use encryption. However, if transparent encryption is used ... like encfs then as soon as the user logs in, the home directory is readable by root. – RubberStamp Mar 26 '18 at 17:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.