Data "loss" in OS X: Is there really a heightened risk?

Given all the recent reports of data loss, are you really at heightened risk for data loss in OS X?

Recently there have been a number of reports around the data loss bug that, while rare, can cause a Snow Leopard user's home folder to be deleted upon logging into and out of the guest account. These reports may have people concerned about their data in OS X, but in reality it is a very rare and easy bug to avoid, and also it is much easier to inadvertently overwrite a file or accidentally trash one than be caught by this bug and other behaviors that may lead to data loss.

So are you at risk? Our quick answer to that is "more than likely not", because of the rarity of the guest account bug. In addition, the guest account by default is set to "Sharing Only", which does not allow you to log in and therefore does not allow the bug to occur. Sharing Only status allows for guests to see shared resources on the network, but they cannot use the computer itself. Unless you have specifically enabled login for the guest account, you are not at risk. If you have enabled login for the guest account, then the probability of this bug occurring is still very low.

Should you be concerned? You should not be concerned all the time about data loss, but these instances are exactly why Apple has implemented the Time Machine backup system. The best way to alleviate concern and safeguard your data is to back up your files. If you are uncertain about a system's stability, backup your files. If you are aware of a data loss bug, backup your files. If you are convinced your system is the most rock solid system on earth and will never crash or corrupt files, still backup your files. Backing up is easy to do, and with the number of options available there is almost no excuse not to.

There are a few situations in OS X where data loss can occur besides the guest account bug. Some of these are intentional implementations of file deletion that when used improperly or inadvertently can cause data loss.

  1. File deletion commands

    The Finder can send selected files to the trash with a key command, and also empty the trash with other key commands. If these are inadvertently pressed then the system can delete files.

    Command-Delete → move selected file(s) to the trash
    shift-command-Delete → Empty trash with confirmation dialogue
    option-shift-command-delete → Empty trash without confirmation

  2. Terminal misuse

    The terminal contains commands that can delete files on the system really easily. If used improperly, the following terminal commands can potentially erase your entire hard drive:

    rm -- remove files
    rmdir -- remove folders (if empty)
    unlink -- remove files (same as "rm")

    When used with the "sudo" command (ie, "sudo rm /path/to/file"), these deletion commands can be exceptionally dangerous when used improperly, since they will be run with root privileges. This can potentially allow them to delete most items on the boot drive, effectively ruining your OS installation (similar to using "del tree" on old Windows machines).

  3. Undo folder moving in the finder

    There is another situation in OS X where the lack of a checking and notification routine can cause the loss of data. This was brought to our attention by MacFixIt reader "RickardWidell", who outlined the problem on his blog.

    Specifically, the problem is when you copy a folder from one location to another in the Finder and make that the last action done in the Finder. Then open another program and create a document in the newly copied folder. After this, go back to the Finder and press command-Z or choose "undo" from the Edit menu. The Finder will remove the copied folder (that being the last action it did), and will also remove the newly created files in the folder without warning.

    This may not necessarily be a bug, but without notification of data deletion it is another way that people can potentially lose data, so be sure you are aware of your last Finder action before pressing command-Z when in the Finder. This happens on both Leopard and Snow Leopard installations, and may also be the case on previous versions of OS X.

Once again, these ways to delete data should be known by Mac users, but are not a reason to be concerned. Most of them are intentional implementations for managing files, but if used improperly can result in data loss. The best advice is to take precaution and know exactly what you are doing with your computer, and double-check key commands before using them. At the very least, regularly create a full backup of your system.

Tags:
Computers
About the author

    Topher, an avid Mac user for the past 15 years, has been a contributing author to MacFixIt since the spring of 2008. One of his passions is troubleshooting Mac problems and making the best use of Macs and Apple hardware at home and in the workplace.

     

    Join the discussion

    Conversation powered by Livefyre

    Show Comments Hide Comments