Repair Disk Permissions from the Command Line in Mac OS X

Aug 10, 2010 - 5 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

5 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.

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