You have commented 339 times on Rantburg.

Your Name
Your e-mail (optional)
Website (optional)
My Original Nic        Pic-a-Nic        Sorry. Comments have been closed on this article.
Bold Italic Underline Strike Bullet Blockquote Small Big Link Squish Foto Photo
-Short Attention Span Theater-
Man accidentally 'deletes his entire company' with one line of bad code
2016-04-16
[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

#11  The most surprising thing might be that so many people believed him, including those on a forum for technology experts.

That's because it's every tech's nightmare.
Posted by: Fred   2016-04-16 14:48  

#10  I see lawsuits in his future...

Sounds like he used a tool to run the same command on all his servers... And the journalist is an idiot.

I've seen something similar. A customer had just upgraded to a new Tandem nonstop system and the field engineer started taking down the old system. The first thing he started as to 'relabel' (read reformat) all the disks. Unfortunately he was working across the network on the new production system. Oops!
Posted by: CrazyFool   2016-04-16 10:30  

#9  Safe bet: Nicholas Cage stars in everything...
Posted by: Steve White   2016-04-16 10:01  

#8  In 5 years there's going to be some hacker movie called "RM -RF" staring Nicholas Cage.
Posted by: Charles   2016-04-16 09:18  

#7  According to PC World, it's a hoax.
Posted by: trailing wife   2016-04-16 09:14  

#6  H.Clinton - where was that dumbass when I needed him?

Well, Hill, he wasn't enrolled in the Crony Connection Cabal you all so rely upon.
Posted by: Procopius2k   2016-04-16 08:26  

#5  When is the State Department FBI CIA AND NSA going to hire that dude to cover their asses!
Posted by: Unearong Whomort2812   2016-04-16 07:36  

#4  Hell its Saturday, why not? BOFH 2nd Number

"... Modify the user's password minimum from 6 to 32 letters, give the password a 1 day lifetime, set it so that they HAVE to use the password generate utility when they change their password (so their password will always be something that looks like vaguely pronouncable line-noise), add a secondary password with the same as the above, then redefine their CLI tables so that the only command that works is DELETE, and all other commands point to it."

Beautiful. Shit I'm good.

He calls back.

"MY FILES ARE GONE!", he screams, panicking.

"Did you have a backup?", I ask, as sweet as pie.

"But that's what you people are supposed to do!", he sobs.

"Yeah, well we did - but then we switched to those 8mm tapes, and they're the same size as the ones in my video camera, so I've been using them to tape the neighbor's sex romps..."

I hear the revolver go off, but what the hell, it's 5pm, and not my problem...
Posted by: Shipman   2016-04-16 07:07  

#3  It's a hoax.
Posted by: Glenmore   2016-04-16 07:00  

#2  LOL Users, bet it was the pimply-faced- youth what done it.

/BOFH
Posted by: Shipman   2016-04-16 06:56  

#1  You hear legends and rumors of this sort of thing. This is the first time I have seen a documented case of the awesome power of the mis-applied 'rm -rf'
Posted by: Nguard   2016-04-16 01:38  

00:00