Unlocking OS X Disk Utility’s hidden secrets

“One of OS X’s most versatile utilities is Disk Utility — a tool not only used for formatting and managing a variety of storage devices, but also employed for fixing damaged volumes and performing the ever-so-common ‘permissions fix’ routine,” Topher Kessler writes for Macworld.

“While these features are relatively apparent,” Kessler writes, “the program does have some often overlooked options that can be useful.”

Covered in the article:

• Alternative checksums
• Quickly create disk images from folders
• Manage hidden volumes on your Mac
• Verify and repair multiple items at once

Full article here.

MacDailyNews Note: Today is Martin Luther King Day in the U.S. and the markets are closed. As usual on such trading holidays, we will have limited posting today.

21 Comments

  1. Given the expertise of Apple’s coders, why is it that Disk Utility on my MacBook Pro ALWAYS shows hundreds of Permissions that are screwed up?

    If the OS or Apps screws them up, then why doesn’t the OS stop it or fix it automatically after each wrong reassignment?

    Truly odd.

    1. Disk Utility’s Repair Permissions function isn’t as magical a tool as a lot of people seem to assume. It’s a very simple tool that is meant to reset the states of ownership and permissions of *specific sets of files*, and *only* those files listed in the receipts of specific software in the receipts folder. This receipts folder is located at /Library/Receipts in Mac OS X versions prior to 10.6, and was moved to /private/var/db/receipts starting with version 10.6.

      Repair Permissions reads the contents of each receipt in the receipts folder to find out which files and folders it should examine. Receipts are typically created by software installers that use the Mac OS X built-in /Applications/Utilities/Installer program to install a software package, though they may be placed into the receipts folder by other means as well. Receipts typically contain a “Bill of Materials” file that lists of each important file and folder in the installed software package, along with the expected ownership and permissions those files and folders, according to the install package.

      Repair Permissions examines only those files listed by these receipts. This means the files in your home folder and the files in the local domain (/Library for instance) are *not* examined.

      The Repair Permissions tool has a rather serious design flaw: it does not know how to resolve cases where multiple receipts list the same file or folder with differing ownership and permissions. This actually happens fairly frequently, particularly when more than one software package installs and uses a shared library or other system resource that happens to be used by another software package. If there are multiple receipts that list a given file or folder, and the expected ownership and permissions differ between those two receipts, Repair Permissions will encounter the first receipt, change the ownership and permissions to honor that receipt, then encounter the second receipt and change the ownership and permissions to honor the second receipt. This typically manifests itself in Disk Utility’s Repair Permissions log as a file/folder that never seems to be actually repaired, flipping back and forth between two states.

      Once you understand how it works, you see Repair Permissions is not half as useful or magical as a lot of people seem to believe. I wish more people understood this – we probably wouldn’t see so many Mac users running Repair Permissions at the drop of the hat or on a regular schedule as we see so often. ; )

      Bottom line: If you are not experiencing problems with a specific piece of software listed in the receipts folder, there’s no reason to run Repair Permissions.

      1. Not to be confused with the “Verify Disk” and “Repair Disk” commands (on the other side of the same “First Aid” tab), which are very useful and meaningful, especially when experiencing problems. And something you may want to run immediately before applying a major system update, to confirm there are no existing data corruption issues on your startup disk, even there are no apparent problems.

    2. At any given time, an app or several apps may have altered the permissions of various files. This is normal. You will never run a permissions repair without at least some issues. If you’re not having problems, there’s no reason to run it anyway.

      1. Sorry Howie, but running ‘Repair Disk Permissions’ continues to be a GREAT idea for avoiding potential problems. The BOM files are created for a reason. As always, however, I agree that it’s not worthy of anyone’s obsessive compulsions. I run it about once a month, and it always finds rubbish to repair.

    3. A better question is why software installed with a BOM file (Bill of Materials) can’t be bothered to properly set its permissions when it’s installed. This happens with applications from the likes of Adobe as well as Apple! Adobe used to be the #1 culprit but have since cleaned up their act.

      Apple has been particularly lazy about this, depending upon the application. Recently, Apple has made a mess of iTunes and Safari permissions. I bet I can run ‘Repair Disk Permissions’ right now and find a bunch of broken Apple permissions. Here goes!

      (Skipping over the usual ‘ACL found but not expected’ crap):

      Repairing permissions for “whatever”
      Permissions differ on “Applications/Safari.app/Contents/Resources/Safari.help/Contents/Resources/index.html”; should be lrwxr-xr-x ; they are -rwxr-xr-x .
      Repaired “Applications/Safari.app/Contents/Resources/Safari.help/Contents/Resources/index.html”
      Permissions differ on “System/Library/CoreServices/Feedback Assistant.app”; should be drwxr-xr-x ; they are lrwxr-xr-x .
      Repaired “System/Library/CoreServices/Feedback Assistant.app”
      Group differs on “Library/Printers/InstalledPrinters.plist”; should be 80; group is 0.
      Permissions differ on “Library/Printers/InstalledPrinters.plist”; should be -rw-rw-rw- ; they are -rw-r–r– .
      Repaired “Library/Printers/InstalledPrinters.plist”
      Group differs on “Library/Preferences/com.apple.alf.plist”; should be 80; group is 0.
      Repaired “Library/Preferences/com.apple.alf.plist”
      . . .
      Permissions repair complete

      Next time there’s an iTunes or Safari update, run ‘Repair Disk Permissions’ and see the mess to clean up. COME ON APPLE!

  2. Perhaps Apple should strive to make more things visible and obvious instead of hiding them. Ive’s minimalist GUI meme has gone WAAAAAAAAAAAAAAAAAAAY too far.

    1. Generally speaking, if you aren’t knowledgeable enough to work utilities like this or find “advanced” settings in OS X you shouldn’t be monkeying around with them.

      Personally, I find the balance between ease of use and getting into advanced settings quite perfect with the current version of OS X. If someone wants to fix (or f-up) their system, they should have to work at it a little bit. Which, in turn, keeps normally running systems from getting messed up by users who have neither the skills nor inclination to dig in past the “first layer” GUI.

    2. Advanced options in Apple’s dialog boxes are, well, advanced and if users want to go further, then UNIX is there, if they take the time.

      We don’t want Apple to put the “Erase Hard Disk” command out where it can “execute” by accident, so to speak.

      1. If a UNIX command line is the answer, does this defeat the whole purpose of the Mac OS? McUser is right that the GUI should make these things obvious and NOT secrets.

        Ask the question another way: why should only a small percentage of Mac users understand what Jolly Roger told us above? At a minimum, shouldn’t the Mac by now have a useful Help menu that educates mere normal users?

        It’s time to stop apologizing for Apple’s shortcomings. The OS needs to be MORE user-friendly, not more secretive.

        1. How many times have you found an “advanced” function in a dialogue box and clicked on the Help function only to discover that there is no help available. Not only is this not helpful but it means that the exact purpose and effect of the function remains a mystery. Why is this allowed?

  3. You can also create a “Fusion Drive” (combined logical volume using an SSD and hard drive) using the Terminal command-line Disk Utility. Once created, the desktop Disk Utility treats it like any volume, under a device named “Fusion.”

    Here’s a Disk Utility procedure I use to “stress test” a hard drive. For example, when I receive a brand new hard drive or when I want to check an old hard drive to confirm it’s still working OK. Select the hard drive DEVICE in the Disk Utility sidebar (not the volume indented below). Go to the Erase tab. Click Security Options button, and set it to write a “single pass of zeros over the entire disk.” This procedure is meant to securely erase existing data on the drive, but it also serves as a good test because every sector of the drive is accessed. It can take up to a few hours to complete, depending on hard drive capacity. If the procedure errors out (or stalls “forever”), the hard drive may have a hardware problem. NOTE: This obviously erases the hard drive; don’t do it on a hard drive you are currently using to store data.

    1. If it keeps a “file” on the drive, it’s not really a “reformat.” Just use Finder, do a Select-All at the root of the drive’s volume, drag the selection to the trash, and empty the trash. That “erases” the drive’s volume while retaining any custom icon for the volume.

  4. My personal favorite “hidden secret” is to use the poorly-named “Restore” tab to create a weekly bare-metal clone backup of my internal drive to an external USB 3.0 drive running at 7200 rpm – boy is it quick.

Reader Feedback

This site uses Akismet to reduce spam. Learn how your comment data is processed.