我正在使用Capistrano在CentOS(Apache + Passenger)上部署我的应用程序,当我访问我的网站时,我得到了“HTTP 500(内部服务器错误)”的错误提示,并检查error_log文件,看起来错误如下:
DAV/2 Phusion_Passenger/3.0.19 mod_ssl/2.2.24 OpenSSL/1.0.0-fips configured -- resuming normal operations
Rails Error: Unable to access log file. Please ensure that /home/admin/myaap/releases/20130506191509/log/production.log exists and is chmod 0666. The log level has been raised to WARN and the output directed to STDERR until the problem is fixed..
production.log的权限
-rwxrwxr-x 1 root root 46211 May 6 20:49 production.log
和
ActionView::Template::Error (Permission denied - /home/admin/myaap/releases/20130506191509/tmp/cache/assets/D3B
目录D3B未找到。
我在通过谷歌寻找解决方法,其中之一是sudo chown -R root:root /home/admin/myapp/
,但对我无效,还有其他方法可以解决吗?
注意:
我正在使用root用户进行部署和安装rvm,并将根目录位置放在用户'admin'(kloxo控制面板)下。
更新
在error_log文件中发现了权限和无法访问的错误,我正在使用chmod go-w /home/admin/myapp
和chmod 0666 production.log
,但我的网站仍然显示500服务器错误,如何检查错误?
drwxrwxr-x 3 ubuntu ubuntu
(权限,用户,组),并且它正在工作,也许您可以从这些权限中进行指导。 - sites