Why is my /usr/local/bin only accessible by root user? Which rights to fix it?
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.