Changing Ownership of a directory in OS X
chown, homebrew, macos
Solution
On my system, `/usr/local` is owned by `root:admin` and is `rwxrwxr-x`. My user is a member of the `admin` group, thus has write permissions. I haven't messed with ownership and permissions there, and my Homebrew installation is not complaining, so I assume my setup fits its requirements.
Check the ownership of your `/usr/local`; if it is owned by group `admin`, check if your non-adminsitrator account is a member of that group.
Problem
I've installed homebrew, and am trying to change the write permissisons for the /usr/local/include directory. When I run 'brew doctor', I get this error message: Error: The /usr/local directory is not writable. Even if this directory was writable when you installed Homebrew, other software may change permissions on this directory. Some versions of the "InstantOn" component of Airfoil are known to do this. You should probably change the ownership and permissions of /usr/local back to your user account. I tried doing that with chown, but I'm pretty new at this and don't think I was running it correctly. I ran: ``` chown myusername /usr/local/include ``` I didn't get any error message, but when I run brew doctor it says I still lack permission to write to /usr/local/include. Any help would be greatly appreciated! Edit: I'm getting an "operation not permitted" error. `cd /usr` `chown myusername local` chown: local: Operation not permitted