Rails:“权限被拒绝-/ tmp / cache / assets / development / sprockets / ...”? [英] Rails: "Permission denied - /tmp/cache/assets/development/sprockets/..."?
问题描述
当我运行Rails应用程序并使用浏览器导航到它们时,我从 rails
收到错误:
When I run a rails app and navigate with browser to them I get an error from rails
:
Permission denied - /path/to/my_rails_app/tmp/cache/assets/development/sprockets/37b5a12047376b10a57191a10d3af30a rails error
在 ./ tmp /
后面没有这样的文件/文件夹。是什么问题?
And I have no such file/folders behind the ./tmp/
. What is the problem?
推荐答案
创建或拥有 my_rails_app目录的用户不能被服务器写入。 / p>
The user who created or 'owns" the my_rails_app directory isn't writable by the server.
chown -R webserveruser:webserveruser /path/to/my_rails_app
将webserver用户更改为http或apache或运行服务器的任何用户名。:右边的实体是组,请使用可写的组名您的用户,如果您需要写访问权限而不更改用户。
Change the webserveruser to http, or apache or whatever username is running your server. The entitiy to the right of the : is the group, use a group name that is writable by your user if you need write access without changing users.
这篇关于Rails:“权限被拒绝-/ tmp / cache / assets / development / sprockets / ...”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!