MacOS – Restore permissions on /usr

macospermission

Through a series of unfortunate events I managed to run:

sudo chown -R `whoami`:admin /usr

on my 10.10.5 machine. This has left it in an awkward state. I can no longer sudo commands as sudo is no longer owned by root on the machine.

I tried booting in to single user mode and chown'ing /usr back to root:wheel but /usr is a read-only file system in single user mode.

Apart from a total reinstall of OS X on the machine, is there anything else I can do to get the permissions on /usr back to root:wheel?

Best Answer

Managed to make / writeable by running

mount -uw /

in single-user mode and then I was able to repair the permissions with:

chown -R root:wheel /usr