MacOS – To repair permissions for Lion, is it safe to use Disk Utility in Recovery OS for Mountain Lion

macospermission

Background and question

I read of someone using a Mountain Lion Recovery System to attempt repair permissions of an installation of Lion.

I understand that for repair of permissions of Lion, it may be preferable to use OS X 10.7.5 or Recovery OS 10.7.5.

A question remains:

  • for repair of permissions of an installation of Lion, is it safe to use Disk Utility in a Mountain Lion Recovery OS?

Notes

diskutil(8) OS X Manual Page

… The data that guides the permissions verification is written during the installation process. …

– but it's not clear whether that data is read from the selected volume when Disk Utility is run from a Recovery OS.

For verbs verifyPermissions and repairPermissions a plist is optional, but there's no interface to this in Disk Utility.

repair_packages(8) OS X Manual Page

Thanks to commentary, I see that an OS X run of Disk Utility to repair permissions involves both diskutil and repair_packages. Here's a line from output of fs_usage:

03:06:31  access            r/libexec/repair_packages    0.000019   diskmanageme

For another run, a little later,

macbookpro08-centrim:~ gjp22$ sudo fs_usage | grep "usr/sbin/diskutil"
03:09:24  open              usr/sbin/diskutil                                                                0.000021   repair_packa
^C
macbookpro08-centrim:~ gjp22$ 

– at the same time,

macbookpro08-centrim:~ gjp22$ sudo execsnoop | grep 'diskutil\|repair_packages'
    0   7963   7143 repair_packages
^C
macbookpro08-centrim:~ gjp22$ 

OS X: About OS X Recovery

This Apple article mentions Disk Utility but not permissions of files.

About Disk Utility's Repair Disk Permissions feature

Best Answer

The diskutil repairpermissions /Volumes/whatever reads the BOM and receipts from /Volumes/whatever and not /. You can validate this with fs_usage and installing OS X on an external volume and running the check while snooping the IO.

It's always preferable to have the OS doing the repairing match the OS on the volume being repaired, but I've never been bitten with a problem by mixing things where a newer OS repairs an older OS. I've gone the other way in a pinch and not had it blow up, but I did make plans to run a proper repair when time was available soon thereafter.

Also - this is a very rare tool and like antiboitics, often gets prescribed erroneously. Repairing permissions only twiddles with Apple software and rarely is a problem due to incorrect permissions on a log file or an Application bundle.