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

Re: RFC: preventing accidental deletion of system directories



On Sat, Mar 22, 2008 at 05:12:50AM -0500, William Pitcock wrote:
> On Sat, 2008-03-22 at 22:16 +1300, Francois Marier wrote:
> > Basically, the wrapper (see attached file) has a blacklist which
> > contains
> > directories like /usr/lib, /home, /etc and removes those before
> > passing its
> > arguments to the real 'rm' command.
> 
> While I'm sorry for you having to reinstall your system, I think that
> having such a wrapper as a default feature in Debian is absolutely
> ludicrous and should be avoided at all costs.
> 
> Maybe asking "Are you sure you want to do this", but outright refusing
> to do something seems quite ridiculous to me.

Except, the question WAS ALREADY ASKED (kind of).  The system does protect
such directories pretty well already, by making them removable only by root.

If you do file management as root, "rm -r" is likely to be used only if:
* you herd vservers/chroots
* you're restoring/messing with backups
* you're moving directory hierarchies to another filesystem


To get those Vistaesque questions, "alias rm='rm -i'" is surely not worth a
package.  It's slightly larger in scope, but only slightly, as removing
files as root means you mess with system directories, right? 

-- 
1KB		// Microsoft corollary to Hanlon's razor:
		//	Never attribute to stupidity what can be
		//	adequately explained by malice.


Reply to: