Warning while installing the rails plugin

好久不见. 提交于 2019-12-04 16:35:49

问题


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


回答1:


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.

For instance:

  • chmod o-w /usr/local/bin
  • chmod o-w /usr/local
  • chmod o-w /cygdrive/c



回答2:


This is due to the fact that /usr/local/bin is writable by your application when maybe it shouldn't. You can fix this by changing the permissions on this directory.



来源:https://stackoverflow.com/questions/2872680/warning-while-installing-the-rails-plugin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!