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

Re: rm files owned by root?



* Thomas Bushnell:

>> 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.

Apparently not true.

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

This indeed requires write permissions on the target directory, at
least on ext3.  It would be interesting to try it on a file system
which doesn't have the "." and ".." entries.



Reply to: