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.
I'm also having the exact same problem with both /usr/local/bin and /etc/sudoers on OSX Snow lepard.Even when i logged in as admin and tried to change the permissions via the terminal, it still says "Operation not permitted". And i did the following to get the permission of these folders.
From the terminal, I accessed /etc/sudoers file and using pico editor i added the following code: username ALL=(ALL) ALL Replace "username" with your MAC OS account name
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:
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.
I had the same error here MacOSX 10.11 - it seems ruby checks to see if any directory (including the parents) in the path are world writable. In my case there wasn't a /usr/local/bin present as nothing had created it.
Run this command in your terminal.Try this sudo chmod 775 /usr/local After this if you have any password on your mac , then you have to enter the password . Now this issue will be fix.
I had the same error here MacOSX 10.6.8 - it seems ruby checks to see if any directory (including the parents) in the path are world writable. In my case there wasn't a /usr/local/bin present as nothing had created it.
so I had to do
to get rid of the warning.
A question here is does any non root:wheel process in MacOS need to create anything in /usr/local ?
Same here, apparently my /usr/local folder was world writable so I made it 755
It also appeared that a Hauwei mobile dongle I had used had installed world writeable directories in /usr/local as well
Am using Mountain Lion. What I did was Look for /usr/local and Get Info. On it there is Sharing and Permissions. Make sure that its only the user and Admin are the only ones who have read and write permissions. Anyone else should have read access only. That sorted my problem.
Its normally helpful is your Run disk utilities and repair permissions too.