Man Accidentally Deleted Entire Company by Running One Line of Bad Code

Marco Marsala

A man had accidently deleted entire details about his company on his server by one mistaken piece of code. The hosting provider Marco Marsala had removed all the trace of his company and the websites which he looks after for his customers.

At a forum for server experts named Server Fault, Marsala wrote that he had accidently run a code which had wiped off entire details from the server through his own computer. He asked for advice on how to fix it. Most of the experts have said that he had just accidentally deleted the data of his company and its clients, and there’s no way that it could be retrieved.

(Also Read: iOS 10 Update: Coolest Features Coming on iPhone 7? [WATCH])

According to Independent, Marsala had run a command “rm-rf”—a rudimentary command that will erase everything it is told to. The command says that “rm” means remove and “r” means delete everything within a given directory while “f” means “force.” These commands instruct the computer to ignore the usual warnings that come when deleting files.

When these codes are put together and made to run, the computer deletes everything in it, and this is what happened to Marsala’s customers’ websites.

(Also Read: iPhone 7 Specs: Everything You Need to Know!)

Generally, the code would delete the specific parts of the computer as instructed at a particular point. However, the code was written in a way that it didn’t actually specify anywhere so it removed everything on the computer.

 “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. 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,” wrote Marsala, notes 9News.

He had also confirmed that the code had even deleted all of the backups which he had created in the case of catastrophe, but everything went in vain as the drives that were backing up the computers were also attached to the computer. The code had wiped those drives too.

To Top