Re:Man accidentally 'deletes his entire company' with one li...
by Avshalom on Thursday April 14, 2016 @04:03PM
(#11499894)
here's a dumb idea off the top of my head: /etc/rmblacklist.conf autopopulated (by the distro) with a list of files (/boot and the actual bootimage for instance) that requires a GNU style long option --nuke to delete. It's still easily scriptable but you'd rarely ever actually need it and requiring a long option would serve as a double check that you meant it when you did.
Sure it's still possible to --nuke something due to a bug or negligence but I bet it'd cut down on fatal errors. Plus the user could have their own ~/.rmblacklist.conf to guard against particularly persistent dyslexias.
You could even erase the contents entirely if you really think being able to delete root on a whim keeps your kung fu strong.
Re:Man accidentally 'deletes his entire company' with one li...
by nickpsecurity on Thursday April 14, 2016 @08:30PM
(#11501279)
Good to see you fighting the fight with many sensible ideas. I've been posting this one in most responses as it's pretty simple:
Re:Man accidentally 'deletes his entire company' with one li...
by Avshalom on Thursday April 14, 2016 @09:37PM
(#11501507)
Hah! Beat me to the punch by 5 years.
Re:Man accidentally 'deletes his entire company' with one li...
by nickpsecurity on Thursday April 14, 2016 @10:14PM
(#11501630)
Darn, I didnt notice it was that old. Makes situation even worse for UNIX rm defenders. Like when Trusted Xenix eliminated setuid vuln's mostly by clearing setuid bit during a write w/ admin having to manually reset it. Simple shit. Mainstream response? "Just audit all your apps for setuid and be extra careful in..." (sighs)
Re:Man accidentally 'deletes his entire company' with one li...
by Tiksi on Thursday April 14, 2016 @10:14PM
(#11501632)
You could just make the file immutable and read only:
Then remove the immutable flag if needed
Re:Man accidentally 'deletes his entire company' with one li...
by justinlardinois on Thursday April 14, 2016 @08:04PM
(#11501178)
This isn't a bad idea.
You can redesign rm so people don't find themselves typing -rf as force of habit.
You can have multiple delete commands: mark as overwriteable if need and remove from 'ls -a', actually delete, overwrite sectors with zeros; like we have in guis.
You can have a permission system that isn't just "this account can do literally anything" or "this account can't do anything"