Man Deletes his Entire Company with One Line of Bad Code

Man Deletes his Entire Company with One Line of Bad Code


Have you ever done something that is spectacularly catastrophic? Well, one guy named Marco Marsala who ran a web hosting company with over 1500 customers on his servers did something just that horrifying!

Man Deletes his Entire Company with One Line of Bad Code #Programming #technology Click To Tweet

He ran a piece of code on his server that wiped out ALL the data on his servers. Heck even the backups (as the drives backing up were mounted to the servers as well) were wiped just clean!

“I run a small hosting provider with more or less 1535 customers and I use Ansible to automate some operations to be run on all servers,” wrote Marco Marsala. “Last night I accidentally ran, on all servers, a Bash script with a rm -rf {foo}/{bar} with those variables undefined due to a bug in the code above this line.All servers got deleted and the offsite backups too because the remote storage was mounted just before by the same script (that is a backup maintenance script).”

The problem is the rm -rf: code.  The “rm” means remove.  “r” deletes everything within a directory and “f” is “force – which tells the system to bypass the usual warnings that come when one is deleting files!

Voila!  So everything goes off without any warnings!

Since that was pretty much his entire business – those 1500+ websites – which are all gone completely – he has in reality deleted his company as well.  Wonder what he would be doing to handle his irate customers and how can he ever make a career comeback from here?

Also Read:  OpenSSH 7.1p2 Brings Patch for Bug That Could Expose Private SSH keys by Malicious Servers

Featured Image Source: DeviantArt\thiennh2

%d bloggers like this: