rsync: chgrp "/.hosts.NBCxBB" (in test) failed: Operation not permitted (1)

#记一次rsync出现的错误(网上基本都是说权限问题)

#这并不是权限的问题,应为实际的文件已经传过去了,但是rsync就是会报这个错误,(虽然使用是正常的,但是看着就是不爽)

[root@localhost ]# rsync -avz  /etc/hosts    vuser@10.0.0.8::test  --password-file=/etc/rsync.password    
sending incremental file list
hosts
rsync: chgrp "/.hosts.NBCxBB" (in test) failed: Operation not permitted (1)

sent 85 bytes  received 133 bytes  436.00 bytes/sec
total size is 257  speedup is 1.18
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1178) [sender=3.1.2]

  

解决方案

在rsyncd.conf配置文件中加上fake super = yes(旧版本不需要,新版本需要)

[root@localhost ~]# head    /etc/rsyncd.conf     
uid=www
gid=www
use chroot = yes
incoming chmod = Du=rwx,Dg=rwx,Do=rx,Fu=rwx,Fg=rwx,Fo=r
port 873
log file = /var/log/rsyncd.log
pid file = /var/run/rsyncd.pid
fake super = yes   #添加这行

  

原文地址:https://www.cnblogs.com/zhangb8042/p/10266408.html