Just Entertainment

Latest entertainment news and gossip from the world of bollywood, Hollywood and regional film industries. Get the latest celebrity news on celebrity scandals

Monday, 9 May 2016

Man accidentally ‘deletes his entire company’ with one line of bad code

Man accidentally ‘deletes his entire company’ with one line of bad code


Marco Marsala, a hosting services provider based out of London typed in a code that he originally intended to clear out issues, but which led to deleting everything in the servers.

Marco ran a web hosting company which managed websites and their data of about 1535 customers



Marco was running a maintenance script on the servers of his company when he executed a piece of code. This code was meant to be automated so that certain irregularities could be ironed out. But because of a small error, the automation script failed to catch the irregularities, and hence wiped the entire system.

The rogue code is known as a ‘bash’ code in a programming language, and it is designed to delete stuff

Consider you want to delete two folders named x and y. For that, you will have to type in the code like: rm -rf x/y
Here ‘rm’ deletes folders and the ‘f’ means ‘force.’ By using the force option, the system will not ask you or other users for any input, and will bypass all securities to delete whatever it is told to. In Marco’s case, the x and y conditions failed to get caught, and hence the system understood it as ‘delete everything.’

Marco posted for help on a server experts forum, but experienced users confirmed that the inevitable has occurred

He wrote on a forum for server experts ‘Server Fault‘ yesterday, that he was stuck after accidentally running destructive code on his own computers, including the websites of his customers.
The code, “rm -rf”, deleted everything and blocked the helpful warnings that usually inform the user that something is being deleted. He hadn’t specified what he wanted deleted, it erased everything, The Independent reported without mentioning where the company is based.
“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,” he said.
He confirmed that the code had even deleted all of the backups that he had taken as the drives that were backing up the computers were mounted to it, the computer managed to wipe all of those too.

“All servers got deleted and the off-site backups too, because the remote storage was mounted just before by the same script (that is a backup maintenance script),” he added.

Most users agreed that it was unlikely that Mr 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.
“This will be extremely expensive and still extremely unlikely to really rescue you, and it will take a lot of time.”
Others agreed that perhaps Mr Marsala was on the wrong forum.
“You’re going out of business,” wrote Michael Hampton. “You don’t need technical advice, you need to call your lawyer.”
Many of the responses to Mr Marsala’s problem, weren’t especially helpful – pointing out that he could have taken steps to stop it happening before it did.
“Well, you should have been thinking about how to protect your customers’ data before nuking them,” wrote one person calling himself Massimo. “I won’t even begin enumerating how many errors are simultaneously required in order to be able to completely erase all your servers and all your backups in a single strike.
“This is not bad luck: it’s astonishingly bad design, reinforced by complete carelessness.”
Mr Marsala’s problem is far from the first time that someone has accidentally destroyed their own system by missing a mistake. Indeed, the responses to his post mostly referenced a similar thread posted two years ago, with the headline “Monday morning mistake”.
That error saw someone accidentally lose access to their entire server, after they  didn’t notice a stray space in the code.
All images used for representational purposes
Source: 1

No comments:

Post a Comment