Bug#485088: ITP: safe-rm -- wrapper around the rm command to prevent accidental deletions
Bonjour Ludovic,
Thanks for the heads up with respect to the broken URL. I'll check why it
hasn't made it there yet. In the meantime, the source can be found here:
http://people.debian.org/~francois/safe-rm-0.2.tar.gz
On 2008-06-08 at 15:20:20, Ludovic Rousseau wrote:
> What are the benefits compared with "chattr +i file" to make the file
> immutable and protect it from erasure?
You're right, that's another good solution. In fact, I'll add your solution
to the safe-rm README file. Thanks for the suggestion!
Here are a few advantages of safe-rm over chattr +i:
- non-root users can blacklist their own directories (in addition to the
system-wide ones)
- no dependency on a filesystem feature, so you can protect vfat and nfs
mounts too
- there is an easy way to bypass this protection temporarily if you really
need to (call /bin/rm.real directly)
- easy to setup: the default install after apt-getting safe-rm will protect
usual system directories (e.g. /usr/, /etc, /var, /bin, ...) without any
extra steps
In the README file I also mention other approaches which may be more
appropriate depending on your needs:
delsafe
http://homepage.esoterica.pt/~nx0yew/delsafe/
libtrashcan
http://hpux.connect.org.uk/hppd/hpux/Development/Libraries/libtrash-0.2/readme.html
Cheers,
Francois
Reply to: