Running brew generates warnings

Chiron picture Chiron · Jan 1, 2011 · Viewed 17.1k times · Source

I installed the latest Homebrew on OS X 10.6.5
Running any command generates this warning:

/usr/local/Library/Homebrew/global.rb:34: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777

Why I'm getting this warning? and how to remedy?

Answer

Andrey Tarantsov picture Andrey Tarantsov · Jul 29, 2012

I had the same problem and just fixed it with these 3 commands, roughly taken from Homebrew installation script:

sudo chgrp -R admin /usr/local
sudo chmod -R g+rwx /usr/local
sudo chmod -R o-w /usr/local