手机版
你好,游客 登录 注册
背景:
阅读新闻

rsync:mkstemp failed:Permission denied

[日期:2013-10-01] 来源:Linux社区  作者:dihuo [字体:大 中 小]

问题:10.0.0.181

[root@test181 ~]# rsync -azv bb.tar rsync_backup@10.0.0.182::ggp --password-file=/etc/rsync.password
sending incremental file list
bb.tar
rsync: mkstemp "/.bb.tar.CXMF7s" (in ggp) failed: Permission denied (13)
sent 227 bytes  received 27 bytes  508.00 bytes/sec
total size is 10240  speedup is 40.31
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1039) [sender=3.0.6]ji

解决:10.0.0.182:
原因一:
/etc/rsyncd.conf配置文件中有错误,如uid = rsync写成了d = rsync.请仔细检查
/etc/rsyncd.conf配置模板:

[root@test181 ~]# cat /etc/rsyncd.conf
uid = rsync
gid = rsync
max connections = 200
timeout = 300
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock
log file = /var/log/ryncd.log
[ggp]
path = /ggp/
ingnore errors
read only = false
list = false
hosts allow = 10.0.0.0/24
hosts deny = 0.0.0.0/32
auth users = rsync_backup
secrets file = /etc/rsync.password

原因二:/ggp的权限不正确。
[root@ggp ~]# chown -R rsync.rsync /ggp

10.0.0.181再次执行成功

[root@test181 ~]# rsync -azv bb.tar rsync_backup@10.0.0.182::ggp --password-file=/etc/rsync.password
sending incremental file list
bb.tar
sent 227 bytes  received 27 bytes  508.00 bytes/sec
total size is 10240  speedup is 40.31

Rsync 的详细介绍:请点这里
Rsync 的下载地址:请点这里

推荐阅读:

利用inotifywait监控主机文件和目录 http://www.linuxidc.com/Linux/2013-03/81075.htm

利用inotify+rsync实现Linux文件批量更新 http://www.linuxidc.com/Linux/2012-01/52132.htm

inotify-tools+rsync实时同步文件安装和配置 http://www.linuxidc.com/Linux/2012-06/63624.htm

rsync同步完整配置 http://www.linuxidc.com/Linux/2013-06/85781.htm

linux
相关资讯       rsync 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款