2

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.

6
  • Please be more precise about what you mean by "hide some files".
    – fkraiem
    Feb 8, 2016 at 9:24
  • @fkraiem I mean by "hide some files" the fact that the root can't access my secured files or much better can't see them at all.
    – sarah
    Feb 8, 2016 at 9:45
  • It is not really possible to answer the question without more context, in particular without knowing which capabilities the person behind root has. Encryption can easily be defeated for example by planting a keylogger or sniffing the RAM, two things root can easily do.
    – fkraiem
    Feb 8, 2016 at 9:55
  • The person behind root is not a system engineer in my case. I think that he can't plant a keylogger or sniff the RAM. He uses the root session to access and modify some files.
    – sarah
    Feb 8, 2016 at 10:00
  • -anything- on a disk that a user has "sudo" priviliges over is his and can be removed by this user. If you want something protected: encrypt an USB disk, use passwords on the mount and on the directories and leave that disk OUT of the system when you are not using it.
    – Rinzwind
    Feb 8, 2016 at 10:10

1 Answer 1

5

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.
8
  • 1
    -1 for the opinion-based and off-topic last point.
    – fkraiem
    Feb 8, 2016 at 9:50
  • 1
    @fkraiem might be but he is correct ;-)
    – Rinzwind
    Feb 8, 2016 at 10:07
  • 1
    "password" protection is an option if encryption is out.
    – Rinzwind
    Feb 8, 2016 at 10:10
  • @Takkat thank you for your advices. Hiding files from root is not that simple :)
    – sarah
    Feb 8, 2016 at 10:15
  • 1
    @sarah archive manager ( see askubuntu.com/a/4835/15811 ) But that is not hiding a file. You put it in plain sight. Mind that this will not withstand a formattting of the disk/partition ;-) You should always put them elsewhere (somewhere not accessible by that sudo user)
    – Rinzwind
    Feb 8, 2016 at 10:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .