title: Changing Ownership of a directory in OS X
body: <p>I've installed homebrew, and am trying to change the write permissisons for the /usr/local/include directory.</p>
  
  <p>When I run 'brew doctor', I get this error message: </p>
  
  <blockquote>
    <p>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.</p>
    
    <p>You should probably change the ownership and permissions of /usr/local
    back to your user account.</p>
  </blockquote>
  
  <p>I tried doing that with chown, but I'm pretty new at this and don't think I was running it correctly. I ran:</p>
  
  <pre><code>chown myusername /usr/local/include
  </code></pre>
  
  <p>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.</p>
  
  <p>Any help would be greatly appreciated!</p>
  
  <p><strong>Edit:</strong> </p>
  
  <p>I'm getting an "operation not permitted" error.</p>
  
  <p><code>cd /usr</code></p>
  
  <p><code>chown myusername local</code></p>
  
  <p>chown: local: Operation not permitted</p>