rsync数据同步时报错:rsync: mkstemp 或rsync: delete,Permission denied

 场景:

用jekines自动构建java项目时,用到一个命令rsync -arqz --delete $WORKSPACE/target/yonghe-console/* [email protected]::yonghe-console --exclude-from="/mnt/exclude.list",同步数据时报错,创建,删除全部报错:

rsync: mkstemp "" () failed: Permission denied,授权拒绝

eg:

2018/11/11 18:52:29 [19827] rsync: mkstemp "/WEB-INF/classes/com/baoding/app/.Initializer.class.LTZegt" (in yonghe-console) failed: Permission denied (13)
2018/11/11 18:52:29 [19827] rsync: mkstemp "/WEB-INF/classes/com/baoding/app/.JspContextPathView.class.Q0kBSC" (in yonghe-console) failed: Permission denied (13)
2018/11/11 18:52:29 [19827] rsync: mkstemp "/WEB-INF/classes/com/baoding/app/.MySessionContext.class.DgxYuM" (in yonghe-console) failed: Permission denied (13)
2018/11/11 18:52:29 [19827] rsync: mkstemp "/WEB-INF/classes/com/baoding/app/.MySessionListener.class.4gym7V" (in yonghe-console) failed: Permission denied (13)
2018/11/11 18:52:29 [19827] rsync: mkstemp "/WEB-INF/classes/com/baoding/app/.SecurityConfiguration.class.hn8KJ5" (in yonghe-console) failed: Permission denied (13)
2018/11/11 18:52:29 [19827] rsync: mkstemp "/WEB-INF/classes/com/baoding/app/.SystemProperty.class.k8Oamf" (in yonghe-console) failed: Permission denied (13)
2018/11/11 18:52:29 [19827] inflate returned -3 (21 bytes)
2018/11/11 18:52:29 [19827] rsync error: error in rsync protocol data stream (code 12) at token.c(548) [receiver=3.0.9]
2018/11/11 18:52:29 [19827] rsync: connection unexpectedly closed (181 bytes received so far) [generator]
2018/11/11 18:52:29 [19827] rsync error: error in rsync protocol data stream (code 12) at io.c(605) [generator=3.0.9]

 解决方案:

1、yonghe-console权限不足:chown -R work.work yonghe-console执行后,重启rsync服务

2、rsync配置文件用户信息部分配置有错:如uid=work写成u=work.

 

 

你可能感兴趣的:(rsync数据同步时报错:rsync: mkstemp 或rsync: delete,Permission denied)