Stories
Slash Boxes
Comments

SoylentNews is people

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: 0) by Anonymous Coward on Saturday April 16 2016, @01:55AM

    by Anonymous Coward on Saturday April 16 2016, @01:55AM (#332549)

    SmartOS would simply report an error, see https://youtu.be/l6XQUciI-Sc?t=4864 [youtu.be] (That video is a fantastic interview by the way: it makes me want to work for Joyent). Just as Bryan Cantrill pointed out in the interview, this commonly happens due to bugs with unset variables, and is never what a user wants. Thus throwing an error is the right thing to do (So that is what SmartOS does). It just happens to be the case that its undefined behavior on POSIX anyway (it deletes the current working directory) so you can give the nice error and still be complaint, but the should not be important. As software engineers, we often forget adjusting software like rm to be nice to users is even an option.

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

    by Anonymous Coward on Saturday April 16 2016, @02:24AM (#332561)

    Sounds like SmartOS is trying to be smarter than the owner. Sure, on the whole, it may be an accurate assumption that the owner doesn't know what they're doing. However, doing such things inevitably leads to conflicts with owners who are indeed smarter than the dumb assumptions of operating systems.

    You don't have to 'rm -rf' to screw up an operating system; 'chmod -R 000 /' is just about as much work to clean up.