Man accidentally 'deletes his entire company' with one line of bad code
[INDEPENDENT.CO.UK] A man appears to have deleted his entire company with one mistaken piece of code. 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.
Ummm... No backup?
Mr 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.
This has gotta be from some sort of IT Onion...
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.
Yep. That's what it does.
Together, the code deleted everything on the computer, including Mr Masarla’s customers' websites, he wrote. Mr Masarla runs a web hosting company, which looks after the servers and internet connections on which the files for websites are stored.
He should be backing up, his customers should be backing up, and I have a hard time believing the whole shebang was run on a single server.
That piece of code is so famously destructive that it has become a joke within some computing circles.
Everybody and his girlfriend knows about it.
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. "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."
1535 sites? On one machine? With no backups?
Sounds like he had one physical server and a number of virtual servers.
With no backups, either machine or virtual. I suspect he will have considerably fewer customers a week from now. |
Posted by: Fred 2016-04-16 |