“Try repairing your disk permissions” is a standard Mac troubleshooting tip that’s been going around forever. There are actually two different tools for repairing different types of disk permissions, and one of them is very hidden.
The permissions here are really file and directory permissions, but they’re generally called “disk permissions.” Your Mac won’t automatically repair permissions except while installing or upgrading Mac OS X itself.
Update: As of Mac OS X 10.11 El Capitan, the Disk Utility in Mac OS X no longer includes a way to repair Disk Permissions. This is no longer necessary thanks to System Integrity Protection.
What Are Permissions, and What Does Repairing Them Do?
RELATED: How to Disable System Integrity Protection on a Mac (and Why You Shouldn’t)
Like on other operating systems, including Windows and Linux, files and directories on a Mac each have their own permissions. The permissions control which users and system processes have access to the files, and what they can do. For example, system files are marked read-only so normal user programs can’t modify them. Executable files must be marked as executable or the system won’t allow them to run.
The permission system is a way Mac OS X and other operating systems ensure security. A program you run on your desktop can’t just modify your system files without permission. If you have multiple user accounts on your Mac, permissions keep each user account’s files private from other uses.
Macs have two different types of permissions. There are standard UNIX file permissions, the same sort of permissions you’d find on Linux. There are also more modern access control list (ACL) permissions. You can view a file or directory’s permissions by holding Ctrl and clicking the file or directory in the Finder, clicking Get Info, and looking under Sharing & Permissions
Your Mac contains a database of permissions. The database is stored in “Bill of Materials” files inside the /var/db/receipts and /Library/Receipts folders. Mac OS X system files and third-party applications installed from .pkg files leave .bom files here, and the files list which permissions the system files or program files should have.
When you repair permissions, your Mac looks at the .bom files here and checks the actual files on your system. If a file or folder on your system has permissions that don’t match the permissions specified in the .bom files, your Mac will change the permissions to match those in the .bom files.
Note that this doesn’t apply to all files on your system. Your personal data files don’t have any entries in the permissions database, and third-party applications that don’t use .pkg files won’t be represented in the database. The permissions-fixing operation will leave all these other files alone.
When Should You Repair Permissions?
During the normal use of your system, it’s possible that programs will change file or folder permissions from their original ones. It’s possible that these new permissions will then cause problems. For example, a program might incorrectly assign write permissions to system files, reducing security by allowing normal user programs to modify them. A program might make a program file not-executable, preventing an application from running. A program might accidentally give your user account read-only access to your home folder, preventing you from saving or modifying any files.
There are many problems that can be caused by incorrect — or “damaged” — permissions. Repairing your file permissions is also a safe operation. The repair process shouldn’t cause any problems. That’s why repairing your Mac’s permissions is one of the first troubleshooting tips you’ll get if you have a problem with your Mac.
If you’re not having trouble with your Mac, you shouldn’t need to repair permissions. If you’re having some sort of problem, repairing your permissions is a good, safe place to start.
How to Repair Disk Permissions
You can repair your Mac’s permissions from the Disk Utility application. To open it, press Command + Space to open Spotlight search, type Disk Utility, and press Enter.
Select your Mac’s system partition — generally “Macintosh HD.” Click the Verify Disk Permissions button if you’d like to check your permissions for problems. Click Repair Disk Permissions to check for problems and automatically fix them.
Note that it’s normal for some permissions to change in normal use of your system, and this doesn’t always cause problems. You’ll probably see some incorrect permissions even if there’s nothing wrong with your Mac. This is nothing to worry about. We saw quite a few incorrect permissions on our Mac, but it wasn’t misbehaving at all. They weren’t really a problem.
RELATED: 8 Mac System Features You Can Access in Recovery Mode
That’s it — your permissions will be repaired. If your Mac is experiencing such severe problems that it won’t boot normally, you can also access the Disk Utility from OS X Recovery and repair disk permissions from there. Your Mac also automatically runs a disk permission repair when your install Mac OS X on top of an existing Mac OS X installation, so reinstalling or upgrading your Mac operating system should also fix disk permissions problems.
How to Repair Home Directory Permissions
There’s also a second tool that repairs some permissions. This repair tool will repair your user account’s home directory permissions. If you’re having problems with your user account’s files — perhaps you can’t save any files to your home directory, possibly because it’s been made read-only — you can use this tool.
This tool doesn’t use .bom files to adjust system file permissions, it just repairs a user account’s home directory to the standard, default permissions.
To do this, enter OS X Recovery by restarting your Mac and holding Command + R. In the Recovery environment, click Utilities on the menu bar and select Terminal. Type resetpassword into the Terminal and press Enter. Click your Mac’s hard drive and select the user account that’s experiencing problems.
At the bottom of the window, click the Reset button under Reset Home Directory Permissions and ACLs. This will just reset the user account’s permissions, not its password.
Restart your Mac when you’re done. The user account’s home directory permissions will now be repaired.
Repairing your Mac’s permissions shouldn’t be a mandatory, regular system maintenance task. It will only help if you’re actually experiencing a problem, so there’s no reason to run this tool regularly. On the other hand, this is a safe operation, so there’s no danger in repairing disk permissions if you think it might help.
Image Credit: Karlis Dambrans on Flickr