Меню Рубрики

Mac os x permissions repair

How to repair disk permissions on Mac

Before we start

Having spent some years coding applications for macOS we’ve created a tool that everybody can use. The all-round problem fixer for Mac.

So here’s a tip for you: Download CleanMyMac to quickly solve some of the issues mentioned in this article. But to help you do it all by yourself, we’ve gathered our best ideas and solutions below.

Features described in this article refer to the MacPaw site version of CleanMyMac X.

What are disk permissions and why do they need repairing?

Disk permissions on macOS are used to keep your files secure. They’re designed so that certain programs (or other users if you share your Mac) can’t just dip into a system file they have no business with and modify it. They’d need permission to do that.

Every file and folder on your Mac comes with an associated set of permissions. From the Apple Community:

“Many things you install in Mac OS X are installed from package files (whose filename extension is “.pkg”). Each time something is installed from a package file, a “Bill of Materials” file (whose filename extension is “.bom”) is stored in the package’s receipt file, which is kept in /Library/Receipts/ in Mac OS X v10.5 and earlier. These files don’t take up much disk space and you shouldn’t put them in the Trash. Each of those “.bom” files contains a list of the files installed by that package, and the proper permissions for each file.”

Unfortunately, these permissions can easily become messed up unintentionally. It’s quite common for this to happen when installing and uninstalling apps on your system. And when it does, apps can find themselves with free reign to alter files and modify read-only files which can cause all kinds of permission errors and system issues such as lagging, freezing, or crashing.

If you notice anything out of the norm regarding system performance, the first thing you should do is troubleshoot those disk permissions.

Below we’ll show you two ways: the manual and the easy one. Choose the way that works best for you.

How to repair permissions on Mac: The manual way

If you’re running an older version of macOS, Disk Utility is the go-to tool for troubleshooting problems.

Why an older version?

Because as of macOS version 10.11 El Capitan, Disk Utility no longer comes with the option “repair disk permissions”. Boooo!

Apple even removed the command line:

But there’s a method to the madness. macOS now comes with a feature called System Integrity Performance (SIP) which is designed to automatically repair file permissions during software updates and system changes. SIP works by restricting the root account so that it can’t do things like modify protected locations and processes such as /System and /usr. This should prevent malware from gaining root permissions and infecting your system files.

Anyway, back to using Disk Utility to repair disk permissions. If you’re running a pre-El Capitan version of macOS, follow these steps:

1. Press Command + Space to open Spotlight, type in “Disk Utility”, and hit Enter.

2. Select Macintosh HD from the left sidebar menu.

3. Click on the First Aid tab.

4. Click on Verify Disk Permissions. By taking this step, Disk Utility will work through your hard drive to detect broken or misbehaving permissions and list them for repair. This might take a few minutes but you can check the Show details box to keep an eye on its progress.

5. Click on Repair Disk Permissions and wait while Disk Utility runs through the identified permissions to fix them.

If disk permission issues have played such havoc that your Mac won’t boot correctly, it’s possible to access Disk Utility in Recovery Mode. Do this by holding Command + R during bootup.

If you’re installing a newer (or older) version of macOS on top of your existing operating system, Mac will perform a disk permission repair as a part of the installation so that you start from a clean slate.

How to repair disk permissions on Mac: The easy way

For users of macOS versions El Capitan and newer, the removal of Repair Disk Permissions means you have no troubleshooting solution to turn to in if your Mac is ailing.

But worry not, CleanMyMac X is the hero you need.

CleanMyMac is like Disk Utility in that it does all of the heavy lifting for you to verify permissions and repair your Mac’s disk.

Even System Integrity Performance running quietly in the background doesn’t prevent certain issues from arising. If you’re suffering from any of the following problems, boot up CleanMyMac and have it take care of business:

  • Improper functioning of applications.
  • Inability to move or delete files.
  • Inability to access files.

If you Mac appears to be running fine, it’s still worth running repairs every so often to ensure it stays that way. Not all broken permissions affect performance but that doesn’t mean they shouldn’t be fixed.

Repairing Disk Permissions in a few clicks

First things first, you’ll need to download CleanMyMac X. You can do that here. It’s free so you won’t need your credit card. Once that’s done, follow these five steps:

1. Launch CleanMyMac.

2. Click on Maintenance from the left sidebar menu.

3. Check the box next to Repair Disk Permissions.

CleanMyMac will scan your system to verify disk permissions and automatically repair permissions that are found to be faulty. When the task is complete, you’ll be able to view a log of all the permissions that were repaired.

And that’s all there is to it. Your Mac should now be running as intended.

Disk permissions are critical to your system’s security and performance but only when they’re working as they should. Use CleanMyMac to verify and repair disk permissions whenever you run into issues with apps or files for a healthy running Mac.


How to Verify & Repair Permissions in OS X El Capitan

The Disk Utility app has long contained the ability to verify and repair disk permissions on a Mac, but in the latest versions of OS X this ability has been removed. That doesn’t mean you can’t verify permissions and repair permissions in OS X El Capitan 10.11 and later however, you just need to turn to the command line to do so.

To be clear, verifying and repairing disk permissions has long been over assigned as a remedy to all sorts of issues on the Mac, most of which are rarely accurate or legitimate. In this sense, repairing permissions is sort of considered a form of hocuspocus with little benefit to most OS X situations, but nonetheless there are some unique circumstances where you may want to verify and repair disk permissions in OS X anyway, particularly if a files permissions are actually off, meaning the ability for certain users and processes to read and write particular files and folders.

Note this is not the same as verifying and repairing a disk.

How to Repair Verify Disk Permissions in OS X El Capitan

Open the Terminal application (found in /Applications/Utilities/) and use the following syntax to verify a volumes permissions, this will verify the default root volume of a Mac:

sudo /usr/libexec/repair_packages –verify –standard-pkgs /

If you want to verify permissions on a different drive, specify the volume rather than “/”

The command will run and either show permissions that differ, or nothing, depending on what’s found. Not surprisingly, you’ll likely find some variation of permissions that differs, looking something like:

Permissions differ on “usr/libexec/cups/cgi-bin”, should be drwxr-xr-x , they are dr-xr-xr-x .
Permissions differ on “usr/libexec/cups/daemon”, should be drwxr-xr-x , they are dr-xr-xr-x .
Permissions differ on “usr/libexec/cups/driver”, should be drwxr-xr-x , they are dr-xr-xr-x .
Permissions differ on “usr/libexec/cups/monitor”, should be drwxr-xr-x , they are dr-xr-xr-x .

How to Repair Disk Permissions in OS X El Capitan from Command Line

Assuming permissions have been found which differ and you’d like to repair them, replace the –verify flag with –repair, and again point the command at the same volume:

sudo /usr/libexec/repair_packages –repair –standard-pkgs –volume /

Repairing permissions may take a while, just like it did from Disk Utility.

If you execute the repair_packages command without sudo and with no specifications or flags, you’ll get a simple help guide instead:

$ /usr/libexec/repair_packages
Usage: repair_packages [ARGUMENTS].

–help Print this usage guide.
–list-standard-pkgs Display the package ids in the standard set.
–verify Verify permissions on files in the specified package(s).
–repair Repair permissions on files in the specified package(s).
–pkg PKGID Verify or repair the package PKGID.
–standard-pkgs Verify or repair the standard set of packages.
–volume PATH Perform all operations on the specified volume.
–output-format # Print progress info using a special output format.
–debug Print debuging information while running.

As suggested, this is not really something that should be run on a regular basis as any part of Mac maintenance routine, and it’s rarely necessary, which is likely why Apple pulled it from the Disk Utility application.

By the way, earlier releases of OS X also have a command line approach to repairing disk permissions, but it’s handled through the Disk Utility command line tool instead.


Related articles:


Thanks a lot for this article! Permissions Repair fixed the problem on my Mini Mac. It is hard to understand why the new OS systems have been made less functional!
Best regards.
Ulisses from Brazil.

How do I stop the permissions correction from “correcting” my Java install?

A while back I stubbed out and symlinked all the OS X Java stuff and set up a proper Java install. Ever since “repair permissions” whacks Java. How do I stop the permissions correction from “correcting” my Java install?

I’m not as technically as most here, or maybe half of the posters because “repair permissions” seems to be a love it or hate it proposition. After recently updating to El Capitan, I get screen after screen asking for my password because the OS needs to repair a permission for this or that. After several days, it is happening less often, but I’m sick of it. I must have done it 50 times right after the upgrade from Mt Lion. Now, when I open an app for the 1st time in El Cap, there is a 50/50 chance I’ll get that annoying message. What is up with this? If SIP means no need to repair permissions, why is it constantly making me enter my pw to repair?

I’m the admin user and I can’t run anything sudo because I get this:

sudo: /etc/sudoers is owned by uid 502, should be 0
sudo: no valid sudoers sources found, quitting

Is there anything that can be done in this situation or should I basically format the computer?

I’m sure this is too late to help the original questioner, but if anybody comes across this question:
1) boot off of an external os x disk, stick, or (maybe) the recovery disk.
2) make sure your boot disk is not the internal disk.
3) sudo:chown the /internal_disk/etc/sudoers to 0 (root) or root:staff, root:wheel, or root:admin.

Which / in the command line to specify a different drive than my Mac Drive? I want to repair permissions on an external drive.

How do you write the code to verify external drives exactly? Kindly provide the line please? Thank you.

sudo: /usr/libexec/repair_packages: command not found

I hate the new Disk Utility. Having more functionality is better. The move to gradually hide and bury more and more of OS X’s functionality is really annoying. What I used to be able to do as a power user now forces me to be a light-weight developer to accomplish. It’s getting to the point of being tougher than Windows to get stuff done.

My only guess is that some lamo security tech got laid off from Microsoft, and then somehow sold his ideas of security to Apple – and then completely demolished the old security paradigm that made Macs so awesome.

So just FYI apple broke the remote login (ssh) feature in El Cap and has not fixed it yet. The fix is to chown the /var/empty path as permissions are not set right for ssh to function (must be root owned)

Sure you could just fix that one path but the cli repair works too. Begs the question why aren’t the dot upgrades fixing this issue if permissions get auto repaired?

After reading some of the comments on here. I must state that if your Mac has an issue its very likely that YOU did something to mess it up.

I have provided tech support to Macs and PCs for over twenty years and its funny how people are always trying to blame the OS.

On the other hand, if your issues are with iCloud: Apple has no doubt messed that one up quite a few times (fact) Use Google to back your photos up instead of iCloud.

If your pictures lost their permission,and they are local copies…its an easy fix. Go to the folder that holds the pictures: change the permissions to give your admin user read and write, then click the gear and choose apply to enclosed. BTW, this works for any type of file.

Thank you so much for this article!

I upgraded to El Capitan and subsequently ran into all sorts of trouble with iTunes and an NFS share. I had resorted to reinstalling both iTunes and El Capitan, neither of which solved my issue.

I was getting the “You do not have enough access privileges for this operation.” message when I launched iTunes. I also could not login to iCloud or the iTunes Store. When I tried to login, I got the “This action could not be completed. Try again.” message. I was able to login at icloud.com so I knew my Apple ID was okay.

The repair_packages command found that the ACL was completely missing for iTunes and also that the permissions for the /Users/Shared folder were incorrect. Running with the –repair option fixed my problem.

Just leaving this note here in case anyone with the same issue searching around.

And now a bit of my experience and the respond to those telling that verify-and-repair-permissions has been delusions, I wish it were. After updating to Safari 6 for Lion (OS X 10.7.5 and Safari 6.1.6 I’m on as for this day) I started experiencing the strange issue, misbehavior, oddity, malfunction, whatever you’re calling it: when in Reader mode I try to call Find function I get search field half(or even by 3/4)-hidden behind the tab ribbon. Strangely it’s possible somehow to type a keyword in the search field but using arrows to jump to the keyword in text results in chaotic jiggering of the yellow marker interestingly as if a normal window (in a non-Reader mode) would shift up to the same distance as the search field did in Reader mode and all these yellow markers would shifted up to the same distance as well. TO support my guess here’s repeating Console message I encounter every time this mess occurs:
“Safari: Unlocking Focus on wrong view (), expected ”
Coincidence or not when verifying permissions I’m often (I mean VERY OFTEN) presented this kind of message related to Safari:

“Permissions differ on “Applications/Safari.app/Contents/Resources/Dutch.lproj/BookmarkTitleChange.nib”, should be drwxr-xr-x , they are -rwxr-xr-x”

Repairing doesn’t help in a long run as Safari 6’s permissions get repeatedly corrupted. And yes, I had reinstalled Lion together with Safari – to no avail, so I’m bound by the necessity to repair permissions which is annoying and is definitely a bug which never got enough attention even among users (perhaps being the reason why it wasn’t fixed during all Safari 6 support cycle).

This is not some minor glitch and I don’t want code hocus posts to fit it.

OS X screwed up and it’s telling me that I do not have permission to open 100,000 of my own photographs on my own computer.

This is serious and there is something seriously wrong with OS-X 10.11.5 that caused it to happen.

Apple needs to make an app that undoes this error then add whatever is needed to Disk Repair to apply that fix.

There are legitimate reasons to verify and repair permissions.

If you use any audio or video app that accesses the Library/Audio/Plug-Ins/ directory, over time and for various reasons permissions will differ and applications WILL CRASH before they get through the verification process.

Those users will need to repair permissions.

About DiskWarrior.. I don’t use it much anymore, but in my IT days it SAVED MY ARSE on more occasions than I can remember. It was the only app back in the day that was reliable enough to work almost 100 percent of the time. And it didn’t BS around.

DiskWarrior should be in the Mac app HOF!

Repairing permissions once or twice a year will help you Mac run smoother and faster and to perform as expected. If you use a Mac as a testing ground and are constantly installing and removing software, then you might even need to repair your permissions quite regularly.

The issue, I believe; is those people who have made the jump from a Windows environment to an OS X environment. They come with a whole load of baggage and tend to think that repairing permissions is akin to defragmenting – which of course its not but Windows migrants come with that mindset – defragment, reorganise, reinstall, empty caches on a regular basis.

Basically, running the same maintenance workflow on a Mac that they did on a Windows PC and completely misunderstanding what they are doing in the process.

So yes, I am pleased that Apple has removed this feature from the GUI but I am glad they have left available via the Terminal. Those of us who need it can still run as and when is necessary and the migrant crowd will still get their permissions repair automatically, during upgrades/updates.

To be honest, I kind of wish Apple would remove all maintenance tools from the GUI and make them Terminal only because so many people run these things without understanding what they are doing with them or what they are for.

I had some problems with updating and even running programs. This fixed that! Thank you

I feel so glad Apple removed this (not)! I had 8 pages of permission repairs.. Who needs to see any of that! It’s all just nonsense, like global climate change.

Exercising the demons from Mac OS X 10.11 with the permission-fix holy water… I hear screaming…

I think the real reason they removed Repair Permissions is that , among all the other things that have been getting screwed up in the operating system, it was getting to the point that instead of there occasionally being a few things that got repaired it has now for a long time been common for there to be an endless list of repairs that takes forever and just keeps coming back every time you run it. It makes the unaccustomed user very nervous. Those who have seen it over and over, we were just getting used to grunting and gritting our teeth.

I bought a new iMac 5K retina display with OS X El Capitan in November 2015.
My problem is that every time I try to open Adobe Photoshop I get stopped by a message titled

A problem has occurred with the licensing of this product. Restart your computer and re-launch the product.
If this problem still occurs after restarting, contact Customer Support for further assistance, and mention the error code shown at the bottom of this screen
… ERROR 213:5.

From the forums and chat line suggestions, I was told that it is a “permissions” problem.
I attempted to alter permissions (SL store and PCD), but in the Adobe support library application folder there is no SL Store or PCD
I have tried uninstalling and re-installing. After unsuccessfully trying to sort this problem with Adobe chat, the final suggestion was to create another user account and then try to activate it.
I set up new user account but still had same message, Then used safe mode – still same message with photoshop.
So I uninstalled the cd of Photoshop CS5, and opted to subscribe to Adobe creative cloud on a monthly basis.
I got the same error message so could not open Photoshop, had to get money refunded.

I have been using Photoshop for 15 years, to make the prints that I was selling. I have had online chats with Apple and with Adobe, but not yet found anybody who can enable me to open Photoshop. I have put my query to many forums, but am at a total loss what to do next.
There seems to be knowledgeable people here

Because the perception is that repair and verify permissions is not a very beneficial tool for the masses, Apple has done what they do best and attempted to clean up the interface in an effort to approach the ultimate “Easy Button” solution because all other problems you may encounter are taken care of for you when your not looking. Future OS X releases may eventually just have a green Fix button once they simplify it so much.

Besides any serious tech loves the command line and would prefer that to a GUI right

sarcasm? Even if the fix was a placebo, why not leave it if it makes people feel like they did something to help their problem.

ok, so it’s useless.. so what’s my answer then? I ended up on this page because i’m having errors like “illustrator can’t save the preferences file because it’s locked or you don’t have permission to write…”. I haven’t done anything manually, so what should i do instead of repairing permissions when i have problems with.. er… permissions?

A fine example of fixing something that was not broken and reducing ease of use. Sure, you don’t need to fix permissions often but when you do, it’s not the time to be googling “where the hell did Apple put verify and repair”.

Another option is to use the old Disk Utility from Yosemite to repair permissions. It still works on El Capitan.

OOPs. I was wrong. The “Repair Permissions” button is greyed out in the Yosemite version of Disk Utility running on El Capitan.

Back to the command line or Onyx etc.

The comments that Repair Permissions is always unnecessary is not true — as any Digital Performer user can tell you even in Yosemite. Certain builds of Finale required it too. Just one of those things.

I like Onyx and Cocktail but not for the reasons one might think. Neither actually fix anything but they do allow people to so totally screw up their systems that I get to charge for my time to put Humpty Dumpty back together again. DiskWarrior just does nothing except take your money and waste your time.

That is about as clueless reply as I’ve ever seen!
DW does nothing? Really? Are you a Windoze troll?
Unbelievable… unless you like charging people for manually trying, and failing, to put things right!

How about it bringing up dying drives in Preview mode so that data can be recovered with a minimum of time and effort?
I have no idea how many times that has saved customer’s data when file recovery software, of which I have several versions, would have taken a lot more time and cost.

“Diskwarrior does nothing” Obviously you have NO idea what you are talking about. I fear for anyone unfortunate enough to have your inept and incompetent self bumbling through their system then slapping them with a hefty bill for your confused tinkering under the guise of a repair tech. Please leave computers alone and go back to your job writing those irrational and illogical furniture assembly manuals we do love so much.


Популярные записи