Search code examples
ruby-on-railsmacospermissionsrubygemswarnings

warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777


Every time I run this command rails server:

warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777

I searched for a solution here and they said to type: chmod go-w /usr/local/bin

But I get this error:

chmod: Unable to change file mode on /usr/local/bin: Operation not permitted

I am using OS X by the way.


Solution

  • You will need to have root access to do this. If you aren't already the administrative user, login as the administrator. Then use 'sudo' to change the permissions:

    sudo chmod go-w /usr/local/bin
    

    Obviously, that will mean you can no longer install material in /usr/local/bin except via 'sudo', but you probably shouldn't be doing that anyway.