Repairing permissions: What you need to know

Today's Best Tech Deals

Picked by Macworld's Editors

Top Deals On Great Products

Picked by Techconnect's Editors

1 2 3 4 5 Page 2
Page 2 of 5

Can I get rid of receipts in the /Library/Receipts folder?

If you remove receipts from /Library/Receipts, the Repair Disk Permissions function will no longer affect files referenced in those receipts; if a permissions issue with one of those files is causing a problem, you won’t be able to fix the problem by repairing permissions. But beyond that, some receipts are necessary for the Repair Disk Permissions function to work at all, as described below. In addition, receipts are often used by Mac OS X’s Software Update and third-party software installers to determine whether or not you’ve already got a particular piece of software installed.

On today’s larger hard drives, even a jam-packed Receipts folder is likely to be a few hundred MB or less in size; it’s best to simply leave the contents of this folder alone.

Can I move the files affected by the Repair Disk Permissions function?

File locations are hard-coded in receipts; if you move files listed in a receipt, those files won’t be checked when you repair permissions. This is a good reason not to move Apple-installed software.

I’ve read that before repairing permissions, you need to boot from the volume being repaired because Repair Disk Permissions uses the /Library/Receipts folder on the boot volume to determine correct permissions. Is this true?

This was true in early versions of Mac OS X. In fact, it used to be that if a permissions issue prevented you from booting off your normal startup volume, you needed to repair permissions while booted from the Mac OS X Install disc. Then, once you were able to successfully boot from your normal volume, you used the procedure again to ensure the “correct” receipts were used. However, in all recent versions of OS X, Disk Utility uses the /Library/Receipts folder on the volume actually being repaired, boot or not.

Whenever I try to repair permissions, I get an error that states…

Let me guess: First Aid failed: Disk Utility stopped repairing permissions on ’[volume name]’ because the following error was encountered: No valid packages or Error: No valid packages (-9997). As explained above, the Repair Disk Permissions function uses receipts located in /Library/Receipts to determine what the correct system-level file permissions should be. At a minimum, the procedure requires that a receipt named BaseSystem.pkg —which outlines the default permissions for core Mac-OS-related files and folders—be present. If this receipt is missing, the procedure will fail with one or both of the above errors.

If you find yourself in this position and the BaseSystem.pkg package is no longer present anywhere on your hard drive—so you can’t simply move it back to the Receipts folder—Apple recommends copying it from another computer running the same version of Mac OS X as your own. If that’s not an option, either, then Apple recommends reinstalling Mac OS X. (If your Mac OS X Install disc is for the same version of Mac OS X as is running on your Mac—for example, 10.4.2—you can do a standard install, which simply replaces existing system files with newer versions. However, if your Install disc would install an older version of Mac OS X—for example, 10.4.0 when your Mac is currently running 10.4.6—you need to perform an Archive and Install installation and then update to the latest version of OS X via Software Update.)

Why do I see so many “special permissions” errors when I repair permissions?

The short answer is “Because you haven’t yet updated to Mac OS X 10.4.6 or later.” The long answer is that Apple has at times decided, for various reasons, that certain newly-installed or recently-updated files should actually have different permissions than those of an earlier version. For example, say a file installed with Mac OS X 10.4.0 had particular permissions, outlined in the BaseSystem.pkg receipt, but Apple changed the permissions for that file in a later update to Mac OS X. In such a scenario, there would be a discrepancy between the desired permissions on the file and what the older receipt claims those permissions should be; the Repair Disk Permissions function would try to “fix” the permissions on that file to match the original BaseSystem.pkg receipt, even though those permissions are now “incorrect.”

To avoid such erroneous repairs, recent Apple updates include a file called HintFile.plist , installed in /System/Library/PrivateFrameworks/DiskManagement.framework/Versions/A/Resources, that lists any file permissions that should differ from what’s listed in receipts. Essentially, this file tells the Repair Disk Permissions function, “Ignore what those receipts say about file-such-and-such; the permissions on that file should really be…”

In older versions of Mac OS X, you would see this conversation unfold on your screen in the form of “special permissions” errors in Disk Utility. However, as part of the Mac OS X 10.4.6 Update, Apple modified the Repair Disk Permissions function so that it no longer presents these messages in the Disk Utility window. Nothing has changed in terms of what’s happening behind the scenes; you just no longer have to read the narrative. If you’ve got an older version (pre-10.4.6) of Mac OS X installed, you can simply ignore any message that includes the phrase “We are using special permissions.”

What causes permissions to change?

If you browse the Web, you’ll see many claims that “permissions don’t change on their own.” And to a large extent, that’s true—for permissions to change, something, or someone, must change them. But there are a number of ways permissions can be changed. Here are a few examples:

  • Bad installers: A badly-written installer can change permissions on directories or files; in my experience this is the most common cause of permissions problems. A prime example is an installer that changes the permissions of the /Applications or /Library directory. Installation-related permissions issues are also relatively common on Macs running under an Open Directory domain, and a particular Quark installer made a complete mess of system-level file permissions.
  • User “fiddling”: A user may read about a nifty procedure that fixes a problem or adds functionality and, while trying that procedure, changes permissions on system files/folders (and forgets to change them back).
  • Booting into Mac OS 9: Obviously this one applies only to older Macs, but booting into Mac OS 9 and then moving or editing Mac OS X files can cause permissions problems, since OS 9 doesn’t support OS X-style permissions.
  • Directory or drive corruption: Permissions are data stored on your hard drive. If a drive is experiencing even minor problems, or if a disk’s directory has even mild corruption—a fairly common occurrence—processes may not be able to figure out a file’s permissions, or those permissions may not be reported correctly. This also means that events that increase the chances of drive or directory damage—for example, power interruptions, system crashes, or heavy directory activity— also increase the chances that permissions problems may occur. (Obviously, if your drive is having such problems, you should fix them using Disk Utility or a third-party utility such as Alsoft’s DiskWarrior or Micromat’s TechTool Pro. After doing so, you can repair permissions to fix any related permissions issues.)
  • Bad backup utilities: If your backup utility doesn’t fully support permissions, or doesn’t itself have the appropriate privileges to write system-level files, restoring files from a backup may result in permissions-related problems.
  • This isn’t an exhaustive list, but it does show that although permissions don’t magically change, there are enough ways for them to be changed that you should consider a permissions issue as a possible cause if you experience problems with your Mac. (Apple provides a similar list of possible causes of permissions issues in this Knowledge Base article.)

    1 2 3 4 5 Page 2
    Page 2 of 5
    Shop Tech Products at Amazon