문제

I am getting the following warnings when I run homebrew or any of the ruby web servers locally.

Does anyone know how to get them to go away?

larson:local larson$ brew doctor
/usr/local/Library/Homebrew/global.rb:65: warning: Insecure world writable dir /Users/larson in PATH, mode 040757
/usr/local/bin/brew:74: warning: Insecure world writable dir /Users/larson in PATH, mode 040757
/usr/local/Library/Homebrew/global.rb:65: warning: Insecure world writable dir /Users/larson in PATH, mode 040757
/usr/local/bin/brew:74: warning: Insecure world writable dir /Users/larson in PATH, mode 040757
Your system is raring to brew.
도움이 되었습니까?

해결책

Just remove world write permissions from the directory. As it's your home directory, it really shouldn't have them

chmod o-w /Users/larson

다른 팁

Make the directory not world-writable.

chmod o-w /Users/larson

Change the permissions on the indicated directories to remove the world-writable bit.

as in

chmod 750 ${directory}

Edit: This isn't just your home directory, ruby will gripe if any part of the path contains a world writable permission, since the ability to write to a directory means you can delete any file in that directory, even if you don't own it. Then you can recreate the directory structure and put your own files in place, potentially substituting malicious code.

In other words, if the Users directory is also world writable, it will also cause the error to pop up.

To get them all in one whack:

sudo chmod -R 750 /Users
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top