Capistrano 部署因 scp 失败:/tmp/<project_name>/git-ssh.sh:权限被拒绝 [英] Capistrano deploy failing with scp: /tmp/<project_name>/git-ssh.sh: Permission denied
本文介绍了Capistrano 部署因 scp 失败:/tmp/<project_name>/git-ssh.sh:权限被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在这儿扯头发.我假设部署用户,在这种情况下 www-data
,没有足够的权限来创建必要的目录.或者这是与 SSH 相关的问题?
I'm tearing my hair out here. I assume the deploy user, in this case www-data
, doesn't have sufficient privileges make the necessary directory. Or is this an SSH related problem?
我使用 Capistrano 3.5 部署到 Ubuntu 15.10.
I'm using Capistrano 3.5 to deploy onto Ubuntu 15.10.
这是完整的跟踪
00:00 git:wrapper
01 mkdir -p /tmp/project_name/
✔ 01 www-data@88.xxx.xxx.xxxx
(Backtrace restricted to imported tasks)
cap aborted!
scp: /tmp/project_name/git-ssh.sh: Permission denied
Tasks: TOP => git:check => git:wrapper
(See full trace by running task with --trace)
The deploy has failed with an error: scp: /tmp/project_name/git-ssh.sh: Permission denied
** DEPLOY FAILED
** Refer to log/capistrano.log for details. Here are the last 20 lines:
INFO ---------------------------------------------------------------------------
INFO START 2016-05-18 17:34:33 +0100 cap production deploy
INFO ---------------------------------------------------------------------------
INFO [a283be11] Running /usr/bin/env mkdir -p /tmp/project_name/ as www-data@88.xxx.xxx.xx
DEBUG [a283be11] Command: /usr/bin/env mkdir -p /tmp/project_name/
INFO [a283be11] Finished in 2.160 seconds with exit status 0 (successful).
DEBUG Uploading /tmp/project_name/git-ssh.sh 0.0%
为 Kenster 编辑
在服务器上运行
ls -lR /tmp/<project_name>
输出
/tmp/<project-name>:
total 4
-rwxr-xr-x 1 root root 93 May 17 22:21 git-ssh.sh
推荐答案
最后,我只需要通过运行
In the end I just had to set the permissions for my deploy user 'www-data' on the git-ssh.sh file by running
chown www-data /tmp/project_name/git-ssh.sh
这篇关于Capistrano 部署因 scp 失败:/tmp/<project_name>/git-ssh.sh:权限被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文