警告:PATH 中不安全的世界可写目录/usr/local/bin,模式 040777 [英] warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
问题描述
每次我运行这个命令rails server
:
警告:PATH 中不安全的世界可写目录/usr/local/bin,模式 040777
warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
我在这里搜索了一个解决方案,他们说输入:chmod go-w/usr/local/bin
I searched for a solution here and they said to type: chmod go-w /usr/local/bin
但我收到此错误:
chmod:无法更改/usr/local/bin 上的文件模式:不允许操作
chmod: Unable to change file mode on /usr/local/bin: Operation not permitted
顺便说一下,我使用的是 OS X.
I am using OS X by the way.
推荐答案
您需要具有 root 访问权限才能执行此操作.如果您还不是管理员用户,请以管理员身份登录.然后使用sudo"更改权限:
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:
sudo chmod go-w /usr/local/bin
显然,这意味着您不能再在/usr/local/bin 中安装材料,除非通过 'sudo',但您可能无论如何都不应该这样做.
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.
这篇关于警告:PATH 中不安全的世界可写目录/usr/local/bin,模式 040777的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!