Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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

Why does this work as root?

# touch test1
# chmod 000 ./test1
# echo "test" > ./test1

I take it root is not affected by file permissions?

share|improve this question


This has the answer.

Root has rw on all files. You can mark a file immutable with

chattr +i filename

removing that is

chattr -i filename
share|improve this answer
Not quite correct. Root has rw, but not x (unless it is a directory). sprunge.us/FNMb – Chris Down Jul 19 '13 at 16:01
Thanks for the edit – JasonG Jul 19 '13 at 18:32

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.