My question would be a little bit silly, but who knows because linux is a very rich and sophisticated OS.

Is there a way that a normal user in ubuntu can hide some files from root ?

I know that the root has all privileges ans rights. But, if a simple user can keep files from root that would be awesome and very useful for me.


Solution 1:

You already found out that your administrator (aka root) has all powers to control the system. This includes read and write access to all files on your computer. So from file permissions alone there is no way to prevent root from accessing files in a user's HOME.

In order to prevent privacy abuse from root there are a few option only:

  • Do not grant root access to people you don't trust that they respect your privacy. As everybody can get root access we also need to make sure only trusted people have physical access to our machine.
  • Never store private data on the machine's internal drive or on a local network drive. Use an external medium such as a pen drive or storage in the cloud for that. Lock this drive away from nosy people. Do not store the password to the cloud storage on your computer.
  • Use encryption (e.g. ecryptfs) for private data. This will however only work in case your administrator allowed encryption on your account. Also, it will not stop root from deleting your encrypted files but at least they can't read them.
  • Do not underestimate the benefits from parental control on your computer. If root is your caring parents then there is all reason to always trust them.