OS X Topics

Physical Disk Problems

File System Problems

  • Repair Permissions

Bad File System?

HFS+ vs. UFS

Partitioning: an evolving topic

about: swap

Disk Utility: Permissions Repair

Know your disk repair tools...

Released in June 2001 for OS X 10.1.x, this is available from the Apple's support. The program will restore system files to the proper permissions - back to those as from a freshly installed OS X system, or subsequent update. Under some circumstances, it is possible there can be slight improvements in disk access times (due to more efficient handling of file opens under the HFS+ file system, when secondary lookups are avoided to determine permissions of the files to be opened.)

However it will not restore missing files (File or Directory NOT FOUND errors), nor will it repair files which have been damaged by an errant application (e.g. when an application had a file open for writing but was terminated or system crashed.

The corruption of permissions is NOT something that just 'happens' - usually someone has to take some action to alter the permissions of the system files, and have sufficient privilege to override the existing permissions - generally not possible without supplying a password for authentication to enable operating with the necessary System Administrator (root) privileges.

If you receive 'Permission Denied' errors on system files, this program may 'fix' your system.

Use

This utility only operates on an OS X Boot Partition

IF you use this feature of Disk Utility on a Bootable OS X Partition when booted from another disk or partition, first make sure that 'Ignore ownership on this volume.' of the Ownership & Permissions shown under Get Info for the bootable Partition you want to fix is NOT checked.

This is what the output looked like on one of my bootable partitions recently.

This output is a bit odd, as it shows the permissions of one file being changed multiple times, my guess is that this is the result of the permissions for this file being defined in multiple installer packages, slightly differently. In any event, this output indicates that Repair Permissions did not really do all that much.

Misuse

IF you use this feature of Disk Utility on a Bootable OS X Partition when booted from another disk or partition and the 'Ignore ownership on this volume.' of the Ownership & Permissions shown under Get Info for the bootable Partition you want to fix is accidentally checked. Then this utility will happily churn away for tens of minutes wading through the specified disk, spitting out messages that look something like this:

User differs on <some file>, should be 0, owner is 501
Group differs on <some file>, should be 80, group is 99
Owner and group corrected on <some file>

and it will be going through (potentially) Hundreds of Thousands of files. However, since 'Ignore ownership on this volume.' was accidentally checked, all that work is for naught.

I demonstrated this, as after verifying the partition above (as described above, properly), I went into Get Info for the same partition and checked 'Ignore ownership on this volume.' , then reran verify permissions and it started streaming messages like these:

If you notice, the alleged owner is '501' - the UNIX numeric User ID (UID) for the first OS X user created, while the alleged group is '99' which is the unknown group. Whenever a disk is mounted for which the ownership is ignored, then the volume effectively becomes owned by the user who is logged into the machine, and the group becomes 'unknown'. When Repair Permissions is run on such a disk - every time it looks up what the permission of a file or directory is your user id (usually '501').