日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 综合教程 >内容正文

综合教程

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

發布時間:2023/12/15 综合教程 28 生活家
生活随笔 收集整理的這篇文章主要介紹了 rsync报错:rsync: chgrp ".hejian.txt.D1juHb" (in backup) failed: Operation not permitted (1) 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

問題背景:在配置好rsync服務和客戶端后,客戶端從服務端拉取是正常的,但從客戶端推送到服務端報錯。
a,單獨推送目錄會報這個錯誤
rsync: recv_generator: mkdir "opt" (in backup) failed: Permission denied (13)

[root@nfs01:/opt]# rsync -avz /opt rsync_backup@10.0.0.41::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]

如果從客戶端向服務端推送目錄和文件也報錯rsync: chgrp ".backup.sh.RwFAWn" (in backup) failed: Operation not permitted (1)。但文件傳過去了,目錄并沒有傳過去

[root@nfs01:/opt]# rsync -avz /opt/ rsync_backup@10.0.0.41::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]

然后檢查/backup目錄的權限被修改成了550,原來設置的是755,然后把權限修改成755后再重新操作

[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/

但修改完后再通過客戶端同步,還是報上面的錯,并且剛修改的目錄權限又變成了550

從網上查詢的說是selinux影響,但我檢查兩臺服務器的selinux設置的都是disabled,防火墻也處于關閉狀態

[root@backup:/backup]# getenforce
Disabled

經排查是由于-a參數導致的,因為-a是歸檔模式傳輸,并保持所有文件屬性,等價于-rtopgDl(還沒有具體深入研究),可以使用下面這個命令替代

[root@nfs01:/opt]# rsync -rltDvz /opt/ rsync_backup@10.0.0.41::backup

如果還想使用-avz這個參數組合的話,可以在rsyncd.conf配置文件中添加一個參數fake super = yes也能解決問題
,同樣的命令和配置文件rsync在CentOS6系統之前是不需要的,CentOS7系統需要增加這個參數才不會報錯

總結

以上是生活随笔為你收集整理的rsync报错:rsync: chgrp ".hejian.txt.D1juHb" (in backup) failed: Operation not permitted (1)的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。