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

Re: rm files owned by root?



Florian Weimer <fw@deneb.enyo.de> writes:

> * Ulrich Fürst:
> 
> > Bernd Eckenfels <ecki-news2004-12@lina.inka.de> wrote: 
> >> This is a Unix FAQ. You can delete any file if you have write access
> >> to the directory. Actually you dont delete the file, you remove the
> >> "link" to the
> >
> > So if my /home/ is 775 and root.users and I'm in the group users I can
> > delete everybody's home directory?
> 
> Only if it's empty.  You could rename it to /tmp on most
> installations, where it would be deleted after the next reboot.

Both wrong.  

Removing a directory requires write permission on the directory
itself, because you have to delete the "." and ".." links inside the
directory.

Renaming a directory requires write permission on the directory if its
parent changes, because you have to rewrite the ".." link.

Thomas



Reply to: