[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: rm files owned by root?



if you are in group adm and the /home allows adm group to write to it,
you will be able to remove the directory "test? inside /home/

to be "right" you will need to do this:

as root:
chmod 0700 /home
mkdir /home/test
chmod 0 /home/test
ls -ld /home/test

should show root:root owner of /home/test and /home is owned by root:adm 
the permissions of /home 0700
the permissions of /home/test same as before.

now login with id 1001 and try to remove the directory.


On Sun, 02 Jan 2005 22:14:56 +0100, Bernd Eckenfels
<ecki-news2004-12@lina.inka.de> wrote:
> In article <[🔎] 87652fwplt.fsf@becket.becket.net> you wrote:
> > Removing a directory requires write permission on the directory
> > itself, because you have to delete the "." and ".." links inside the
> > directory.
> 
> no:
> 
> 3root@calista:~# mkdir /home/test
> 3root@calista:~# chmod 0 /home/test
> 3root@calista:~# ls -ld /home /home/test
> drwxrwxr-x  12 root adm 123 Jan  2 22:12 /home/
> d---------  2  root root  6 Jan  2 22:14 /home/test/
> 3root@calista:~# exit
> 2ecki@calista:~> id
> uid=1001(ecki) gid=1001(ecki) groups=0(root),4(adm),20(dialout),24(cdrom),29(audio),38(list),1001(ecki)
> 2ecki@calista:~> rmdir /home/test
> 
> Greetings
> Bernd
> 
> --
> To UNSUBSCRIBE, email to debian-security-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> 
> 


-- 
----)(----- 
Luis M
System Administrator
LatinoMixed.com 

"We think basically you watch television to turn your brain off, and
you work on your computer when you want to turn your brain on" --
Steve Jobs in an interview for MacWorld Magazine 2004-Feb

No .doc: http://www.fsf.org/philosophy/no-word-attachments.es.html



Reply to: