Linux - why am i allowed to remove root file?

Posted by 0xDEAD BEEF on Super User See other posts from Super User or by 0xDEAD BEEF
Published on 2010-06-16T13:30:42Z Indexed on 2010/06/16 13:33 UTC
Read the original article Hit count: 227

Filed under:

Situation as follows: i do su to root, then i create admin file with

cat > adminfile

then i exit from root issuing exit command

i can see following adminfile options

-rw-r--r-- 1 root root 10 2010-06-16 16:25 adminfile

however, after executing rm adminfile it really gets removed

-rw-r--r-- 1 root   root   10 2010-06-16 16:25 adminfile
reinis@reinis-desktop:~/Test/script$ rm adminfile
rm: remove write-protected regular file `adminfile'?

tada.. file is gone!

As i see it - others have only read permision for that file so they shouldnot be able to remove it.. :/

© Super User or respective owner

Related posts about linux