rsync: chgrp failed: Operation not permitted (1)

來源:本站原創 IT小技巧 超過277 views圍觀 0條評論

用rsync 同步本地目錄到遠程服務器

rsync -ar  /data/service/  [email protected]:/data/service/
rsync: chgrp "/data/service/." failed: Operation not permitted (1)
rsync: recv_generator: mkdir "/data/service/bin" failed: Permission denied (13)
*** Skipping any contents from this failed directory ***
rsync: recv_generator: mkdir "/data/service/etc" failed: Permission denied (13)
*** Skipping any contents from this failed directory ***
rsync: recv_generator: mkdir "/data/service/include" failed: Permission denied (13)
*** Skipping any contents from this failed directory ***
rsync: recv_generator: mkdir "/data/service/lib" failed: Permission denied (13)
*** Skipping any contents from this failed directory ***
rsync: recv_generator: mkdir "/data/service/libexec" failed: Permission denied (13)
*** Skipping any contents from this failed directory ***
rsync: recv_generator: mkdir "/data/service/sbin" failed: Permission denied (13)
*** Skipping any contents from this failed directory ***
rsync: recv_generator: mkdir "/data/service/share" failed: Permission denied (13)
*** Skipping any contents from this failed directory ***
rsync: mkstemp "/data/service/.LICENSE.txt.AUGp3J" failed: Permission denied (13)
rsync: mkstemp "/data/service/.NOTICE.txt.X5Qf9z" failed: Permission denied (13)
rsync: mkstemp "/data/service/.README.txt.ekL7eq" failed: Permission denied (13)

原因  hadoop用戶沒有目錄的操作權,將目的目錄修改為 hadoop所有者
[email protected]:/data/service/

查看各臺機器配置
java ~]# cat /etc/rsyncd.conf |grep -v ^#
uid = 1000
gid = 1000

查看目的目錄的權限
service]# ll /data
total 0
drwxr-xr-x 2 root root 6 Jul 23 03:19 service

修改1
修改權限
data]# chown -R 1000:1000 /data/
data]# ll /data
total 0
drwxr-xr-x 2 hadoop hadoop 6 Jul 23 03:19 service

測試
java ~]# rsync -ar  /data/service/  [email protected]:/data/service/

同步完成無報錯

文章出自:CCIE那點事 http://www.qdxgqk.live/ 版權所有。本站文章除注明出處外,皆為作者原創文章,可自由引用,但請注明來源。 禁止全文轉載。
本文鏈接:http://www.qdxgqk.live/?p=4181轉載請注明轉自CCIE那點事
如果喜歡:點此訂閱本站
下篇文章:
?
?
萌宠夺宝游戏 广西11选5人工预测 星游娱乐棋牌 云南快乐十分开奖结果2020 排列5开奖结果l 河北快3 广东好彩一生肖走势图 千炮捕鱼官方版下载 网上棋牌怎么开 qq麻将16番图解 山东20选5开奖查询 旧版球探体育比分下载 广东南粤好彩1开奖结果 股票交易平台排行 f1赛车速度有多快 贵阳多乐捉鸡麻将下 北京28群