This question already has an answer here:
- Why can rm remove read-only files? 2 answers
I've been experimenting with file permissions and ownership lately, and I tried this:
touch a sudo chown root:root a sudo chmod 000 a
I can't read, write, or execute the file, but I can still delete it using
-f. Why is this? I don't own the file, and nobody has any permission for the file. Shouldn't you need root to delete a 000 file you don't own?
---------- 1 root root 0 Apr 3 20:18 a