【发布时间】:2015-02-24 14:52:10
【问题描述】:
我正在尝试使用 Capistrano 部署代码并遇到以下错误:
** [out :: IP] Rails Error: Unable to access log file. Please ensure that /home/deployer/apps/projectname_production/releases/20150224143955/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.
我尝试在/log 目录(和chmod 0666 production.log)中创建文件production.log 并将其部署到服务器,但错误仍然存在。
我错过了什么?
我在部署时又遇到了一个错误:
** [out :: IP] bash: /etc/init.d/unicorn_projectname: Permission denied
我在服务器上检查了这个文件,有以下内容:
lrwxrwxrwx 1 root root 68 Feb 24 14:20 unicorn_projectname -> /home/deployer/apps/projectname_production/current/config/unicorn_init.sh
这个文件应该有什么权限?
提前感谢您的帮助。
编辑:如果我登录到服务器并在服务器上运行此命令 - touch production.log,我会得到 touch: cannot touch 'production.log': Permission denied。
【问题讨论】:
标签: ruby-on-rails ruby nginx capistrano unicorn