How would you feel if the hosting company that you have entrusted with keeping your website has deleted all your files?
Marco Marsala is the owner of a small hosting company, or to put it better, he was the owner of a small hosting company, which unfortunately will close after a fatal mistake.
Before two days, Mr. Marsala had discovered a bug in his code, but after the damage had already been done.
As he mentions in the technical support forum, he managed to delete the contents of servers of the company, along with the backup network files, which should have been separated from the live site hosting infrastructure.
The error was caused by bad design in the code of Ansible, a Linux utility that is used to run automated scripts at certain time intervals on multiple servers at the same time.
Mr Marsala revealed that one of the scripts he used was the very dangerous bash command “rm -rf”, which tells a server to delete all data while ignoring Mistakes and without asking for any kind of confirmation from the user.
As he explained, the pension she used was:
"rm -rf {foo} / {bar}",
where foo and bar were two variables that were dynamically defined and passed through the script.
Due to an error in processing the variables, the general syntax failed to enter their values in the bash command.
So the command then became "rm -rf /", which means "delete everything without asking anything" on disk "/", which is the root of the computer, ie all drives.
Thus, Mr. Marsala and his 1.535 customers were left without data, after the backup copies were also deleted after the destructive command also ran on the storage servers of Backups.
Meanwhile, in support forums his clients are looking for ways to recover. The answer they get is:
"We will close the business. "There is no technical advice, you should call your lawyer."