Repair Disk Permissions from the Command Line in Mac OS X

Aug 10, 2010 - 7 Comments

Terminal in OS X

In some situations, you may need to repair a Macs disk permissions but be unable to access the Disk Utility app, perhaps due to remote management or because of a problem with something in OS X. Fortunately there’s another method you can use to repair disk permissions in Mac OS X, accessible through the command line.

To be clear, this will initiate the exact same Repair Disk Permissions functionality that is seen in OS X Disk Utility app, via the Terminal. Launch the Terminal.app and then just type the following command:


diskutil repairPermissions /

You may want to prefix diskutil with sudo, like so:

sudo diskutil repairPermissions /

This will repair the disk permissions on your Mac’s main drive, determined as the root volume /

As you may have guessed, if you want you can also run the disk permission repair on another disk by specifying the other volume rather than / at the command line.

Regardless of the target disk, once the command has been executed you will see a message like:

Started verify/repair permissions on disk0s2 Mac HD

The time it takes to repair the disk permissions depends on various factors, but the command will update as permissions are repaired and will end itself when diskutil is finished. This process can take quite some time, so be prepared for that and have patience. Separately, you may want to repair user account permissions as well, which requires a different process started upon boot of OS X.

If you have verified disk permissions and you find a bunch of problems, you might want to cross check them with this list from Apple for errors that you can safely ignore.

Enjoy this tip? Subscribe to the OSXDaily newsletter to get more of our great Apple tips, tricks, and important news delivered to your inbox! Enter your email address below:

Related articles:

Posted by: Paul Horowitz in Command Line, Troubleshooting

7 Comments

» Comments RSS Feed

  1. bobobobby says:

    thank you very much!! you’re the savior of so many people, in my concern it’s 4persons, it’s a beginning, thank you!! thx!

  2. […] Repair disk permissions from the command line. Share this:TwitterFacebookLike this:Mi piaceBe the first to like this. […]

  3. jamauai says:

    Is there a way to repair permissions of a specific folder in the file system? For example /Library/Printers/ or something.

  4. bernard cleyet says:

    sudo requires a password how does one find it?

    bc

  5. Bronzit says:

    This password = the 1 you used to sign onto the Mac with. If you did not use a password to sign on, then just hit Return/Enter & it should work.

  6. shthar says:

    What if it says it repaired everything, but then you run it again, and it repairs the same stuff again. This happens with terminal and diskutility. Is this normal?

  7. Kinipopo says:

    Since upgrading to Yosemite, my mid-2010 iMac stopped performing certain functions like hot corners, then I couldn’t get into System Preferences, Library and then finally a few days ago Apple Mail. I tried repairing permissions, but noticed that the permissions were not getting repaired. I saw a few suggestions about deleting a files in Library, but since I couldn’t get Library to open, I Google’d a work around and found this site. I entered this script: sudo diskutil repairPermissions / into terminal and after hitting enter, it executed perfectly. It was taking awhile to finish and so I just did something else for an hour or so. It may not have even taken that long, but I was so frustrated about this and I needed to go away and do something else!
    I restarted and it seemed to take forever for a reboot, but now everything works great, even my hot corners!
    Thank you so much!

Leave a Reply

 

Shop for Apple & Mac Deals on Amazon.com

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates