Hi guys! Something is very weird or I didn't sleep enough last night. I am
puzzled. How can an ordinary user delete a file he has no write access?

See this example:
p...@montblanc:~$ cd /tmp/
p...@montblanc:/tmp$ mkdir test; cd test
p...@montblanc:/tmp/test$ sudo touch file_owned_by_root
p...@montblanc:/tmp/test$ ls -l file_owned_by_root
-rw-r--r-- 1 root root 0 2009-03-31 16:17 file_owned_by_root
p...@montblanc:/tmp/test$ id
uid=1000(pep) gid=1000(pep)
p...@montblanc:/tmp/test$ rm file_owned_by_root
rm: remove write-protected regular empty file `file_owned_by_root'? yes
p...@montblanc:/tmp/test$ ls -l file_owned_by_root
ls: cannot access file_owned_by_root: No such file or directory

I replicate consistently the same operations in several PCs. Doesn't
matter if the file is empty or has any data. So, I am wrong to expect that
rm returns an error when the user doesn't have write rights over that
file?

josep.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to