Stories
Slash Boxes
Comments

SoylentNews is people

SoylentNews is powered by your submissions, so send in your scoop. Only 16 submissions in the queue.
posted by cmn32480 on Friday April 15 2016, @09:53PM   Printer-friendly
from the glad-it-wasn't-me dept.

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.

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.

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.

His backups were also mounted at the time. That's a nightmare scenario, right there.


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 3, Interesting) by KilroySmith on Friday April 15 2016, @09:57PM

    by KilroySmith (2113) on Friday April 15 2016, @09:57PM (#332449)

    Did that once - in my first week at a new job. The other developers started asking "Are you having problems with the server", and I stared at my command line...and the horror slowly rose.

    We did, however, have backups....

    Starting Score:    1  point
    Moderation   +1  
       Interesting=1, Total=1
    Extra 'Interesting' Modifier   0  
    Karma-Bonus Modifier   +1  

    Total Score:   3  
  • (Score: 4, Funny) by Blightbow on Friday April 15 2016, @11:17PM

    by Blightbow (6203) on Friday April 15 2016, @11:17PM (#332494)

    My favorite was a server being reported as "not working" by a developer who had complained loud enough to get root on a system. Sure enough, it was tanked.

    Booted to an emergency image, did a full audit, and the command history looked something like this:

    cd /some/tomcat
    rm -r /lib
    rm -r -9 /lib
    man rm
    rm -r -f /lib

    The "rm -r -9" was my favorite. "It's not working! -9 means do it harder, right?!"

    Once the server exploded, he rebooted and played innocent. Bad gamble, that...

  • (Score: 2) by butthurt on Friday April 15 2016, @11:40PM

    by butthurt (6141) on Friday April 15 2016, @11:40PM (#332510) Journal

    I lost a file I'd not backed up, by using the ">" operator rather than the intended ">>" to append.

  • (Score: 2) by richtopia on Saturday April 16 2016, @12:00AM

    by richtopia (3160) on Saturday April 16 2016, @12:00AM (#332517) Homepage Journal

    I did something similar on my personal server. The issue was I has a symbolic link in the folder I was removing. I realized after 30 seconds that it was taking too long, but still lost 300GB of data before mashing ctrl-c.

    • (Score: 0) by Anonymous Coward on Saturday April 16 2016, @05:32AM

      by Anonymous Coward on Saturday April 16 2016, @05:32AM (#332616)

      That's how users teach noob admins not to nuke home dirs that way.

  • (Score: 3, Interesting) by Whoever on Saturday April 16 2016, @05:57AM

    by Whoever (4524) on Saturday April 16 2016, @05:57AM (#332622) Journal

    A IT contractor for a small company had been asked to add another hard drive to the company file server.

    The server has 2 drives: /dev/hda and /dev/hdb.

    He adds the hard drive and assumes that the new drive is /dev/hdc. Proceeds to format hdc, which was in fact the old drive with the entire network files on it, while the new drive was now /dev/hdb.

    • (Score: 0) by Anonymous Coward on Saturday April 16 2016, @04:27PM

      by Anonymous Coward on Saturday April 16 2016, @04:27PM (#332818)

      For people wondering why: that wasn't that uncommon back in the day. On some distros, /dev/hd[a-d] were commonly assigned based on which pata port it was attached to. Therefore, 1 disk on the primary master was /dev/hda, the second drive on the secondary master was /dev/hdc. However, others would assign them based on the order they were attached. Still others would assign them in a somewhat random order based on a couple of factors like spin up time, other kernel activity, etc. That is why many distros now use various drive ID rules, like UUID, to make sure you get the same disk regardless of other factors.