服务器其它

关注公众号 jb51net

关闭
首页 > 网站技巧 > 服务器 > 服务器其它 > rsync 同步错误

rsync 同步错误 cwrsync rsync error rsync error: some files/attrs were not transferred 解决方法

投稿:mdxy-dxy

今天在帮客户配置机器的时候提示cwrsync rsync error rsync error: some files/attrs were not transferred,最终发现原来是用mcafee设置了文件权限不可写导致,特整理下方便需要的朋友

本人发现这个问题两次了一直以为是服务器问题,因为就一台机器出现了这个问题,原来为了安全特取消了文件的写入与修改权限。通过mcafee的修改权限,问题解决,所以出现问题,先检查目录权限问题。

rsync error: some files/attrs were not transferred (see previous errors)
cwrsync rsync error failed: Invalid argument

cwrsync 在windows 系统上作为服务端

rsync 在linux 系统上作为客户端(推送文件到cwrsync所在的windows 端)
出现错误:
rsync error: some files/attrs were not transferred (see previous errors)
failed: Invalid argument (22)

解决办法一

1.停止windows cwrsync服务
2.编辑E:\Program Files\ICW\etc\fstab文件(cwrsync安装路径)
在文件最后加入一行:
e:/shentest ntfs override,binary,noacl 0 0 //确认e盘shentest文件夹已经建立
3.修改rsync.conf配置文件(比如:将windows下e盘的shentest让linux来推送。)

[2011test]
path = /cygdrive/e/shentest
transfer logging = yes
ignore errors
read only = false

4.保存文件并重启windows上cwrsync服务

5.在linux测试rsync同步推送是否成功

注意的一点:

linux同步到windows端不能使用参数-vaz,否则文件夹就只有rsync能访问,windows用户就不能访问了
我的是下面这样:
rsync test.txt --delete 1.1.1.1::2011test

大家也可以通过查看日志,我这发现原来是部分源文件夹不存在,但我又让他同步这些目录导致,不影响使用。直接忽略。

解决办法二

原因是有文件没有写的权限,导致备份权限不够,两种解决办法:

1、将服务端rsyncd.conf配置文件的uid和gid分别修改成root,重载下,/etc/rc.d/init.d/xinetd reload,再次执行同步,同步成功

2、将需要同步的文件夹及下属文件赋予777权限(chmod -R 777 xxx),再次执行同步,同步成功

注意:如果使用第一种办法,那么在执行完同步后,为了安全,记得将uid和gid修改回来,或修改成nobody

您可能感兴趣的文章:
阅读全文