rsync报错:rsync: chgrp ".hejian.txt.D1juHb" (in backup) failed: Operation not permitted (1)

Question BACKGROUND: After configuring the rsync service and the client, the client from the server pull is normal, but from the client to the server error.
a, separate push directory will report this error
rsync: recv_generator: mkdir "opt" (in backup) failed: Permission denied (13)

[root@nfs01:/opt]# rsync -avz /opt [email protected]::backup
Password:
sending incremental file list
rsync: recv_generator: mkdir "opt" (in backup) failed: Permission denied (13)
*** Skipping any contents from this failed directory ***
opt/

sent 472 bytes  received 172 bytes  257.60 bytes/sec
total size is 697,812  speedup is 1,083.56
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1178) [sender=3.1.2]

If push directories and files from the client to the server is also being given rsync: chgrp ".backup.sh.RwFAWn" (in backup) failed: Operation not permitted (1). But later transfer files, directories, and did not pass in the past

[root@nfs01:/opt]# rsync -avz /opt/ [email protected]::backup
Password:
sending incremental file list
./
backup.sh
hejian.txt
services
rsync: chgrp ".backup.sh.RwFAWn" (in backup) failed: Operation not permitted (1)
rsync: chgrp ".hejian.txt.iLqEOb" (in backup) failed: Operation not permitted (1)
rsync: chgrp ".services.vxwJGZ" (in backup) failed: Operation not permitted (1)

sent 136,811 bytes  received 340 bytes  21,100.15 bytes/sec
total size is 697,812  speedup is 5.09
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1178) [sender=3.1.2]

Then check / backup directory permissions are modified into 550, the original set is 755, then 755 and then re-modify the permissions to operate

[root@backup:/backup]# ls -ld /backup/
dr-xr-x--- 3 rsync rsync 312 Sep  1 07:54 /backup/
root@backup:/backup]# chmod 755 /backup/
[root@backup:/backup]# ls -ld /backup/
drwxr-xr-x 4 rsync rsync 324 Sep  1 08:03 /backup/

But after their modification by end synchronization customers reported above or wrong, and just modify directory permissions, it is a 550

Said online query is selinux influence, but I checked selinux set up two servers are disabled, firewall is turned off

[root@backup:/backup]# getenforce
Disabled

After the investigation is due -a parameter caused because -a archiving mode transmission, and maintain all file attributes, equivalent to -rtopgDl (no specific depth study), you can use the following command substitution

[root@nfs01:/opt]# rsync -rltDvz /opt/ [email protected]::backup

If you want to use -avz this parameter combination, you can add a parameter configuration file rsyncd.conf fake super = yes also to solve the problem
, the same commands and configuration files rsync before CentOS6 system is not required, CentOS7 system needs Increasing this parameter is not being given

Guess you like

Origin www.cnblogs.com/hejian2836/p/11441383.html