Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have some sensitive data and I dont want to share with the root user. As fa as I know the root users can read and modify everything. My question is how can I protect this data. I don't want to give access to the root users to this folder/file.

share|improve this question
up vote 3 down vote accepted

In a Linux (or any Unix) system the root user has the ultimate power to do anything. There is no way to limit the root users ability to view, modify and execute any file or folder. This is more or less the point of the root user.

If you want to protect this folder/file the only thing I can suggest is encrypt it.
Truecrypt is one option. Just keep in mind that this will not stop the file from being moved or deleted if root so desires.

Ubuntu since 8.10 also offers to encrypt either the complete home directory of a user or a private folder. For more information see here

share|improve this answer
I would vote up, if you suggested an encrypting system different from TrueCrypt, not available in the repos, while there are many other alternatives, like encfs, ecryptfs, gpg, and similar. – enzotib Nov 17 '11 at 10:09
Of course, root can sniff your encryption password when you enter it and then gain access to your files, so even that is a moot point. – psusi Nov 17 '11 at 14:56
@psusi Well that is is getting into "active" security. There is really nothing to do about that on any operating system. Depends on how paranoid you want to be. – WalterJ89 Nov 17 '11 at 15:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.