欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

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

程序员文章站 2024-03-14 09:30:52
...

 场景:

用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