尝试安装 Rails 3.0.3 时,路径中的世界可写目录 /usr/local 不安全
我正在尝试安装 Rails 3.0.3,每次都会收到以下错误:
Insecure world writable dir /usr/local in PATH, mode 040777
当我检查它是否已安装时,我收到此错误:
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:827:in `report_activate_error': Could not find RubyGem rails (>= 0) (Gem::LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:261:in `activate'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:68:in `gem'
from /usr/bin/rails:18
知道我做错了什么吗?对不起,我是新人!
I am trying to install rails 3.0.3 and i get the following error every time:
Insecure world writable dir /usr/local in PATH, mode 040777
When I check to see if it installed I get this error:
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:827:in `report_activate_error': Could not find RubyGem rails (>= 0) (Gem::LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:261:in `activate'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:68:in `gem'
from /usr/bin/rails:18
Any idea what I am doing wrong? Sorry, I'm a newb!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您需要在安装之前保护该目录。用途:
执行此操作。如果这不起作用,您可能需要成为
root
(或以其他方式适当授权),以便您可以尝试:并输入密码。
我以前在某些软件上见过这种事情,这些软件确实希望以某种方式设置事物以确保满足其假设。无论如何,拥有全局可写目录实际上是一个坏主意,除非您知道它们的安全性不是什么大问题。
/usr/local
非常重要,您不应该允许任何人对其进行写入。You need to secure that directory before the install. Use:
to do this. If that doesn't work, the you probably need to be
root
(or otherwise suitably empowered) so you can try:and enter your password.
I've seen this sort of thing before on some software which really wants things set up in a certain way to ensure that its assumptions are met. In any case, it's actually a bad idea to have world writable directories except when you know security on them is not a big deal.
/usr/local
is important enough that you shouldn't allow anyone to write to it.对于 osx,它是:
sudo chmod -R ow /usr/local
For osx it's:
sudo chmod -R o-w /usr/local
您将需要运行:
You will need to run: