Why is my /usr/local/bin only accessible by root user? Which rights to fix it? I recently wanted to use pod to update the path of a framework.

Cocoapods is installed and can be find here :

/usr/local/bin/


But surprise! It is set to root only access :


ls -l /usr/local
drwx------   504    wheel  bin/
drwxr-xr-x@  john   staff  include/
drwxr-xr-x@  john   staff  lib/
drwxr-xr-x   root   wheel  share/




So I can't use pod because in any case :


pod install realm


  heeeyy dude, you can't access pod cause you are not root .!.

sudo pod install realm


  heeeyy dude, you can’t use pod as a root! .!.



I feel that this folder shouldn't be set as 'root only' because:


It is in the env PATH of the usr
gem install pod in it?
http://www.tldp.org/LDP/Linux-Filesystem-Hierarchy/html/usr.html basically says :


  '/usr/local' is widely regarded as a good place in which to keep self-compiled or third-party programs.



I know Linux isn't a BSD but still, it doesn't look that much different no o.O



Finally here are my questions:


I searched and there is no user with the uid 504, is this suspicious?


(I checked it with ""dscacheutil -q user | grep 504"")


What are suposed to be the rights and owner on the folder?
Is there someone who had the same problem?
Any idea about why this happened?
The /usr folder is protected by System Integrity Protection (SIP) and owned by root, as are all of its contents, with the sole exception of /usr/local (and its subdirectories).

The root user is uid 0, not 504. The 500-series should be user- or app-created accounts. /usr/local/bin on my system is owned by my username "tubedogg" in group "admin", and has drwxrwxr-x as the permissions.