Currently Being Moderated

kmosx: Repair perms: Operation not permitted

Disclaimer: Apple does not necessarily endorse any suggestions, solutions, or third-party software products that may be mentioned in the topic below. Apple encourages you to first seek a solution at Apple Support. The following links are provided as is, with no guarantee of the effectiveness or reliability of the information. Apple does not guarantee that these links will be maintained or functional at any given time. Use the information below at your own discretion.


Repair permissions: Operation not permitted

Question: When I try to use the "Repair Disk Permissions" command in the Disk Utility application's First Aid tab, I get the following "Operation not permitted" errors:

User differs on ./Applications, should be 0, owner is 501
Group differs on ./Applications, should be 80, group is 99
Owner and group not corrected on ./Applications, reason Operation not permitted
Permissions not corrected on ./Applications, reason Operation not permitted

Answer:

I've had this problem before. It happened when I accidentally deleted my entire Utilities folder and had gotten a copy of the Disk Utility application from a friend's machine. It turned out that copying it from my friend's machine actually altered (corrupted) the file permissions of the Disk Utility application itself, thereby rendering a catch-22 situation where Disk Utility couldn't do its job due to a lack of proper permission settings. I suppose it would be nice if Disk Utility could repair its own permissions if they go awry.

Anyway, the cause of this problem is that the SetUID flag has been lost on the actual Mach-O executable of the Disk Utility application itself. Without getting too technical, what this flag basically does is give the Disk Utility application a higher level of authority to allow it to make changes to your disk. Trying to run Disk Utility without that flag set or with the wrong "user" value can cause most operations to fail with permission errors.

You should be able to fix Disk Utility enough to be able to further fix its permissions as well as your disk permissions by going to my homepage, downloading Repair Disk Utility's Permissions, and following the directions in the ReadMe.rtfd document included.

Or, if you are comfortable using the Terminal application, you could also perform the following 2 commands.

Open the Terminal application located in your /Applications/Utilities/ folder and at the prompt type the following exactly (you may want to copy and paste it):

sudo chown 0 "/Applications/Utilities/Disk Utility.app/Contents/MacOS/Disk Utility"


Then hit return, enter your admin password when asked for it, and hit return again. You should be returned to the next line with another command line prompt. Next type the following and hit enter after doing so:

sudo chmod 4775 "/Applications/Utilities/Disk Utility.app/Contents/MacOS/Disk Utility"


You should then be able to launch Disk Utility and run Repair Permissions to repair your entire volume and also verify and repair any damage to the volumes.

 

Hope this helps....

Do you want to provide feedback on this User Contributed Tip or contribute your own? If you have achieved Level 2 status, visit the User Tips Library Contributions forum for more information.

Replies

Delete User Tip

Are you sure you want to delete this user tip?