Repairing Home folder permissions: a mystery

Permissions are one of the fundamental controls in macOS, to determine what you can see and do with files and folders. Long before the introduction of the signed and sealed System volume (SSV), permissions could go astray in the System, causing havoc. That was mostly fixed with the introduction of System Integrity Protection (SIP), and finished for good with the SSV.

But permissions can still go wrong in sensitive parts of the Data volume, most importantly inside your Home folder. When they do, they can have protean effects, of which the most visible is being prompted to authenticate when trying to move or alter folders and files you should own and control. This article is about how to deal with that, and how Apple’s advice has changed.

Problems with Home folder permissions first became prominent in Sierra, when Apple quietly posted a support note (long since removed without being archived) recommending a new procedure to fix a long list of problems, including:

  • changes to preference settings, particularly those for System Preferences, do not ‘stick’;
  • changes made to the Dock do not ‘stick’;
  • you are asked to authenticate when trying to move or alter some folders in your Home folder;
  • when trying to save, you are told that the file is locked, or that you don’t have permission;
  • Preview, TextEdit, and App Store apps (which are sandboxed) may crash when opened;
  • alerts warning that the startup disk has no more space available for app memory;
  • Safari or SafariDAVClient use large amounts of resources (memory);
  • your Mac runs very slowly;
  • iTunes cannot sync a device;
  • problems with Photos or iPhoto libraries, including inability to import into the library, or forgetting the library each time the app is opened.

These largely result from broken permissions and related problems in ~/Library/Preferences. Repairing these required the diskutil command tool, and although it has never been mentioned in its man page, typing
diskutil resetUserPermissions
in Terminal used to elicit usage information. If you want to read a full account of the original procedure, this article explains all. Repairing permissions in this way became so popular, and effective, that I introduced my own tools to help, and diagrammed it.

RepairPermissions

Nearly three years ago, Apple changed its support note to recommend reinstallation of macOS rather than use of the diskutil command. As I noted at the time, that seemed rather drastic. I proposed alternatives in another chart.

RepairPermissions2

In March 2020, Apple changed the procedure again, to running a new tool named repairHomePermissions in Recovery mode, then reinstalling macOS. By June 2020, Apple had removed that support note too, silently erasing all trace of these procedures. At that time, I suspected that these pernicious problems had arisen because of bugs in the background service that manages preferences, cfprefsd. Once those had been fixed, Apple considered there should be no further need for such repairs.

Although Home folder permission problems in more recent versions of macOS are undoubtedly far less frequent, they do still occur. So what do you do now, in Big Sur or later, when you encounter them?

You can still follow my second chart, and if you wish to use PermissionScanner it’s available from its Product Page, and works a treat on Intel and Apple silicon Macs even in Ventura. With more modern systems you’ll have to be wary of the changes they’ve brought, though: don’t go blundering in changing everything without checking first.

The big mystery is the repairHomePermissions tool. While this is present in Ventura, it has no man page, no usage information, and proves to be a launcher for an app that doesn’t even exist outside Recovery mode. Neither can I find an Apple Support article that mentions it any more.

If you do have Home folder permission problems, you can indeed start up in Recovery, open Terminal there, type in
repairHomePermissions
and this secret app will invite you to select a user, then apparently repair permissions on that user’s Home folder. Exactly what it does, why it’s there, or whether we should even use it, are secrets known only to Apple. But when you run out of all other options, I suppose it is something to try. Just make sure that you have excellent and complete backups before doing so.

Thanks to Kirk, who reopened this can of worms.