【发布时间】:2013-02-16 14:08:27
【问题描述】:
我的 Ubuntu/Apache/Passenger 服务器上的 Rails 存在权限问题。
当我查看我的 Apache error_log 文件时,我看到:
ActionView::Template::Error (Permission denied - /opt/bitnami/apps/tradelogs/tmp/cache/790):
78:
79: <% end %>
80:
81: <% cache do %>
当我查看我的目录时,我看到了 (because I Passenger seems to use this as the user):
-rwxr-xr-x 1 bitnami daemon 154 Feb 28 04:42 config.ru
-rwxr-xr-x 1 bitnami daemon 147 Feb 28 04:42 environment.rb
对于 tmp/cache 目录(缓存中没有 790 文件 - 我不确定是否要创建一个):
drwxr-xr-x 6 bitnami daemon 4096 Feb 28 04:44 tmp
drwxr-xr-x 4 bitnami daemon 4096 Feb 28 05:42 tmp/cache
在我的 Apache httpd.conf 文件中,我有这个:
User bitnami
Group daemon
<VirtualHost *:80>
DocumentRoot /home/bitnami/apps/tradelogs/public
<Directory /home/bitnami/apps/tradelogs/public>
Allow from all
Options -MultiViews
</Directory>
</VirtualHost>
我尝试过的事情:
-
chmod -R 775, 755 在所有目录中 - 将
httpd.conf中的user和group更改为daemon和bitnami
谁能帮我找出我的授权错在哪里?
【问题讨论】:
标签: ruby-on-rails linux apache ubuntu actionview