1

What is the meaning of 000 mode bits incase root user sets 000 for his own file?

I logged in as root user and removed all permissions from a file, still i can see the content of file.

#chmod 000 test
#ls -l
---------- 1 root root   216 Dec 10 13:13 test
#cat test
......
....
File content displayed
....
1
  • Note that it wouldn't make much sense to take away all permissions from a file even for root - such a "zombie" file couldn't be viewed, changed, deleted anymore.
    – schnaader
    Dec 20, 2011 at 11:33

1 Answer 1

5

Basically, rootness trumps permissions.

Permissions 000 means only root can read or write the file.

I'm not aware of any extra special use for the combination of root ownership and 000 permissions.

1
  • Root of course can read that file, but even root cannot write to a 000 file unless permissions are changed.
    – Sreeraj
    Feb 2, 2015 at 4:53

You must log in to answer this question.

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