3

After a recent run of Migration Assistant from an old MacBook to a new one, my Applications folder is owned by my normal user account rather than by root. This prevents VirtualBox from functioning (see here, for example).

Attempting to fix the permissions with a simple sudo chown root /Applications gives the error chown: /Applications: Operation not permitted. This is pleasantly vague, and the Internet assures me that there may be many causes. (I had other sources I could cite, but I'm new to this site, and thus can only post up to 2 links.)

I do not wish to just start removing flags carelessly from /Applications, so I've done some investigating instead. Here's what's NOT the problem:

  • File flags: Only the sunlnk flag is set, which prevents /Applications from being deleted. Seems entirely appropriate for /Applications, so I think there's no problem there. In particular, the suchg flag is NOT set.
  • SIP: That feature doesn't govern the /Applications folder, as far as my reading indicates. So I don't think I need to do any of the "Recovery Mode" business to disable SIP.
  • ACLs: The only one reported by ls -le is group:everyone deny delete which, again, seems entirely appropriate, and doesn't seem to have anything to do with chown.

So that's what's NOT the problem (I think). But I don't know what IS the problem.

  • Is sunlnk a valid flag? I don't have el capitan but you can check in man 2 chflags. – fd0 Jul 12 '16 at 17:57
  • I can confirm sunlnk on the /Applications folder on El Capitan. – Alistair McMillan Jul 12 '16 at 18:01
  • Yes, sunlnk means you that the "unlnk" (unlink = delete) operation is "s"et (the flag is on, not off). – Nathan Jul 12 '16 at 19:31
3

Funnily enough this is a perfect example of one of the few situations where repairing disk permissions is actually called for.

Unfortunately the Repair Disk Permissions option has been removed from Disk Utility in El Capitan.

However you can still do it from the command line.

In Terminal run the following command to find out which permissions are incorrect.

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

And run the following command to repair the permissions.

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

More information here: http://osxdaily.com/2015/11/04/verify-repair-permissions-mac-os-x/

  • 1
    Thank you, but this did not succeed. While this did repair a lot of things, it also gave a lot of "Error 1: Operation not permitted" messages. At the end, my Applications folder is still owned by my main user, not root. – Nathan Jul 12 '16 at 18:28
2

Turns out I was wrong to assume that SIP could not be at fault. When trying the operation with SIP disabled, it worked. I also needed to chmod /Applications to have permissions 755 (was 775) before VirtualBox would be happy, but that, too, was doable with SIP disabled. All working now.

Thanks to a discussion ranklord and I had in some comments above, and then in the chat for this question, for figuring this out.

0

What shows your 'Get Info' command (right-click on Applications folder) and can you change owner from there?

enter image description here

  • 1
    My UI does not look like yours. I do not have a "Permissions" section, just a "Sharing & Permissions" section with a different UI, like this: ibin.co/2npqPDIByBvN.png – Nathan Jul 12 '16 at 19:30
  • Is the user under which you are working in admin group then? – Denis Rasulev Jul 12 '16 at 19:35
  • No, I seem to be in the "staff" group. – Nathan Jul 12 '16 at 19:37
  • 1
    Hmm... May be we have close encounter with SIP here? :) – Denis Rasulev Jul 12 '16 at 19:44
  • 1
    Beside the topic of this post: what did you do/install to make the "Get Info" panel look like this? – comfreak Jul 12 '16 at 22:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .