0

Is there any way that I create and modify a file/directory from a user user1, and prevent all other users including the root user from accessing/modifying the file(s)/directories?

1
  • You cannot hide anything from root. Period. The root user has full access to block devices, RAM and everything. Commented Jan 23, 2023 at 14:12

1 Answer 1

1

No, there is no such way. The root has access to everything. That is the whole reason for root's existence.

If you want hide some files from root - create them on USB stick and unplug it once you done working with files. And yes, if during the time that USB is plugged in, root become curious - he would be able to check the files on USB too.

Encrypting files can help somewhat, if to read the document requires a password - the person with root privileges will also need that password to work with files.

Another way - put the files on a network and to access them a person will need to know the files location first. Add here password to the network service, and your local root will not have any control over your files.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.