Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

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

1 Answer 1

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). –  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.