News

This one line of code just destroyed a whole company

A small hosting provider with 1,500+ customers was just accidentally destroyed by its owner with just one line of code.

Marco Marsala runs a web hosting company that looks after the servers and internet connections on which the files for websites are stored. He was just having a normal work day and after encountering a bug in his code, he executed a simple one-line command but instead of fixing the bug, the command ended up deleting his whole company.

How can a line of code delete a company? Well, the code Marsala ran was “rm -rf”, a simple command that can delete everything it is told to. Basically, the “rm” tells the computer to remove, the r deletes everything within a given directory and the f stands for “force”, instructing the computer to ignore the usual warnings that come when deleting files. It is normally used to only delete specific parts of the computer but due to a horrendous yet minor error, the code ended up deleting everything on Marsala’s computer, essentially removing all the data of the servers his company looked after.

“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 on a forum.

To make it even worse, the command also deleted all of his offsite backups because the remote storage was mounted just before by a backup maintenance script. As a result, every piece of data essential to his company’s existence is gone and as of now, it is nearly impossible for it to recover. As one commenter said, “I feel sorry to say that your company is now essentially dead”.

Backing-up important data is an essential piece of advice given by most technical experts but this incident shows that how sometimes, even having one backup isn’t enough.

UPDATE: In a shocking move, Marsala, the person who claimed to have deleted his whole company through the code mistake, has now revealed that the whole ordeal was simply a hoax. In fact, it was more of a marketing stunt to promote his own company, Ansible, that actually prevents such large scale mistakes, and that the situation he described “can not happen” with that tool.

Source- Independent

Sponsored
Rehan Ahmed

I cover startups, review gadgets and talk about latest developments in the technology industry. Get in touch through rehan@techjuice.pk.

Share
Published by
Rehan Ahmed

Recent Posts

Meta’s CEO Allegedly Approved the Use of Pirated Books to Train AI Systems, Authors Claim

A group of authors, including Ta-Nehisi Coates and comedian Sarah Silverman, have accused Meta Platforms…

17 mins ago

Seven Countries Deport 258 Pakistanis in Just 24 Hours

KARACHI: In the past 24 hours, 258 Pakistanis have been deported from Saudi Arabia, the…

27 mins ago

Samsung to Launch AI Subscription Service for Galaxy Smartphones

Samsung is set to extend its AI Subscription Club to its Galaxy smartphones and the…

1 hour ago

Google’s Gboard Beta Reportedly Testing Undo and Redo Features

The Gboard app for Android is reportedly getting an update from Google that will make…

2 hours ago

WhatsApp Shifts Server Operations Abroad Amid Pakistan’s Internet Disruptions

In response to ongoing internet disruptions in Pakistan, international companies, including the popular instant messaging…

2 hours ago

Famous Travel Vlogger Chris Lewis Labels PC Hotel Karachi “Dirty” in Review

KARACHI: Chris Lewis, an American vlogger, recently went viral after posting a video in which…

2 hours ago