Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
852 views
in Technique[技术] by (71.8m points)

macos - How to solve Insecure world writable dir /usr in PATH,mode 040777 warning on Ruby?

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin13/rbconfig.rb:213: warning: Insecure world writable dir /usr in PATH, mode 040777

I've tried these two commands after searching for solutions on Stackexchange, but it didn't work for me. It still shows me the warning which I've pasted above.

sudo chmod 775 /usr/local

sudo chmod go-w /usr/local/bin

How do I fix this warning message? I'm running OS X 10.9 Mavericks

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Learn to read the error messages closely.

Insecure world writable dir /usr in PATH

Note it's not saying /usr/local.

To confirm this diagnosis, use

 ls -ld /usr
 drwxrwxrwx  14 ownerID  groupID     4096 Dec 10  2010 /usr
 #-------^-  is the world-writeable  part

As you know, you can fix it with

 sudo chmod 755 /usr

Edit

Folks, See my scripted solution over here.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...