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那點事
如果喜歡:點此訂閱本站
下篇文章:
?
?
萌宠夺宝游戏 澳洲幸运10计划 微信彩票官方网站 博远棋牌游戏网站 上海时时乐杀两码组合 大话西游充钱怎么赚钱吗 下载波克棋牌 幸运农场下载 自己加工手镯赚钱吗 50元可提现的棋牌游戏 陕西十一选五开奖预测 彩票实战手册 股票指数怎么计算的 极速十一选五走势图一定 大力龙龟持国哪个赚钱 纸牌游戏 福建十一选五杀号