安装 rails 插件时发出警告 [英] Warning while installing the rails plugin
问题描述
在 Rails 应用程序中安装任何插件时,我收到以下警告.
I am getting the following warning while installing any plugin in my rails application.
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_support/core_ext/kernel/agnostics.rb:7: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
谁能告诉我如何解决这个问题?谢谢
Can someone please tell me how to solve this problem? Thanks
推荐答案
Ruby(在所有 Unix 上,包括 Cygwin 上)会在您尝试运行外部程序并且 $PATH 包含一个全局可写目录时发出警告.它不只是检查 $PATH 上的目录:它还会检查它们的每个父目录,因为如果/usr/local(比如说)是全局可写的,那么/usr/local/bin 就像可写一样容易被破坏自己.
Ruby (on all Unixes, including Cygwin) warns if you try to run an external program and your $PATH contains a world-writable directory. It doesn't just check the directories on $PATH: it checks each of their parents, too, because if /usr/local (say) is world-writeable, /usr/local/bin is subverted as easily as if it were writeable itself.
解决方法可能是从相关目录中删除其他"写入权限.
A work-around could be to remove "other" write permission from the relevant directories.
例如:
- chmod o-w/usr/local/bin
- chmod o-w/usr/local
- chmod o-w/cygdrive/c
这篇关于安装 rails 插件时发出警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!