tmp 中的权限被拒绝 [英] Permission denied in tmp
本文介绍了tmp 中的权限被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我刚刚使用 Ruby 1.9.2 部署了一个 Rails 3 应用程序.我遇到了几个错误.
I just deployed a Rails 3 app with Ruby 1.9.2. I have been getting several errors.
application.css
未编译.所以我将production.rb
中的预编译设置为 false;- 然后我得到:
cannot generate tempfile
,所以我做了rake tmp:clear
; - 现在我收到
ActionView::Template::Error (Permission denied -/srv/www/appname/tmp/cache/assets):
并且我无法解决这个问题.
application.css
wasn't compiled. so I set pre compilation inproduction.rb
to false;- Then I got:
cannot generate tempfile
, so I didrake tmp:clear
; - And now I get
ActionView::Template::Error (Permission denied - /srv/www/appname/tmp/cache/assets):
and I haven't been able to fix this one.
请帮忙.
推荐答案
如果运行您的 Web 服务器的 user:group
是 http:http
并且它在 *nix 上运行,这样做:
If the user:group
running your web server is http:http
and it's running on *nix, do this:
sudo chown -R http:http /srv/www/appname/
还有,愚蠢的问题,但是/tmp/cache/assets 存在吗?
Also, silly question, but does /tmp/cache/assets exist?
如果是这样,正如 @leonel 指出的那样,您可能还需要更改权限:
And, if so, as @leonel points out, you may also need to change the permissions:
chmod 777 /srv/www/appname/tmp/cache
小心设置777
权限.这样做只是为了验证权限问题,然后重置为所需的最低权限.
Be careful setting 777
permissions on anything. Only do this to verify a permissions issue, then reset to the most minimal permissions necessary.
这篇关于tmp 中的权限被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文