Man Accidentally ‘Deletes His Entire Company’ With One Line Of Bad Code

3
>>Follow Matzav On Whatsapp!<<

A man appears to have deleted his entire company with one mistaken piece of code, THE INDEPENDENT reports.

By accidentally telling his computer to delete everything in his servers, hosting provider Marco Marsala has seemingly removed all trace of his company and the websites that he looks after for his customers.

THE INDEPENDENT explains that Marsala wrote on a forum for server experts called Server Fault that he was now stuck after having accidentally run destructive code on his own computers. But far from advising them how to fix it, most experts informed him that he had just accidentally deleted the data of his company and its clients, and in so doing had probably destroyed his entire company with just one line of code.

The problem command was “rm -rf”: a basic piece of code that will delete everything it is told to. The “rm” tells the computer to remove; the r deletes everything within a given directory; and the f stands for “force”, telling the computer to ignore the usual warnings that come when deleting files.

Together, THE INDEPENDENT reports, the code deleted everything on the computer, including Masarla’s customers’ websites, he wrote. Masarla runs a web hosting company, which looks after the servers and internet connections on which the files for websites are stored.

That piece of code is so famously destructive that it has become a joke within some computing circles.

Normally, that code would wipe out all of the specific parts of the computer that it was pointed at. But because of an error in the way it was written, the code didn’t actually specify anywhere – and so 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,” wrote Marco Marsala, according to the THE INDEPENDENT. “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.”

Marsala confirmed that the code had even deleted all of the backups that he had taken in case of catastrophe. Because the drives that were backing up the computers were mounted to it, the computer managed to wipe all of those, too.

Most users agreed that it was unlikely that Marsala would be able to recover any of the data. And as a result his company was almost certainly not going to recover, either.

“I feel sorry to say that your company is now essentially dead,” wrote a user called Sven. “You might have an extremely slim chance to recover from this if you turn off everything right now and hand your disks over to a reputable data recovery company. Read more at THE INDEPENDENT.

 

{Matzav.com}


3 COMMENTS

  1. This is a Unix / Linux lesson that is good to be lectured about every once in a while, but it is unrealistic. Most *nixes ask for confirmation. The filesystem is mounted in a way to minimize this sort of troubles. It takes two or three lines, the previous one being cd / (and before that, we need to be superuser or root). And if worst comes to worst, if really the disks are wiped, it’ll take a few hundred dollars and a data recovery company will solve the issue within hours. By the way the flag -f does not mean ignore confirmation requests (which may or may not be the default on our machine), it overrides the “write protection” “delete protection” etc. which on the Unix is an attribute of the file. (Elsewhere, it is more aptly a joint attribute of the file + the process trying to access it.)

    If you need a system and network manager who is not very good, but still much better than this supposed “professional”, let me know! I do think this is some modern version of the ancient “educational joke” which seems to be around since 30+ years.

Leave a Reply to tzoorba Cancel reply

Please enter your comment!
Please enter your name here