warning: Insecure world writable dir when I run a ruby or gem command

Trip picture Trip · May 9, 2010 · Viewed 32.3k times · Source

Not sure why I'm getting this, but I just installed RVM, the new Ruby 1.9, and reinstalled a bunch of gems, and I get this

/Users/johnsmith/.rvm/rubies/ruby-1.9.1-p378/bin/gem:4: warning: Insecure world writable dir /opt/local/bin in PATH, mode 040777

Everything still runs otherwise, but I was wondering if there was a way I could get rid of it.

Answer

Alex Martelli picture Alex Martelli · May 9, 2010

Just chmod go-w /opt/local/bin at a shell prompt (depending on permissions you may need to sudo to do that).