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系统需要增加这个参数才不会报错
转载于:https://www.cnblogs.com/hejian2836/p/11441383.html
rsync报错:rsync: chgrp .hejian.txt.D1juHb (in backup) failed: Operation not permitted (1)相关推荐
- npm install 报错(npm ERR! errno -4048,Error: EPERM: operation not permitted,)解决方法
npm install 报错(npm ERR! errno -4048,Error: EPERM: operation not permitted,)解决方法 参考文章: (1)npm install ...
- Linux 报错chmod: changing permissions of ‘/etc/ImageMagick-6/policy.xml‘: Operation not permitted
Linux中使用chmod修改文件权限时报错 解决方法 执行命令 sudo chmod 777 /etc/ImageMagick-6/policy.xml
- android 网络时区 错误,React native 安卓机器上调试代码报错:网络请求出错TypeError: Network request failed...
React native 安卓机器上调试代码报错:网络请求出错TypeError: Network request failed 安卓机器 usb连接调试 报错信息 TypeError: Networ ...
- 关于eclipse中web项目tomcat报错Server Tomcat v9.0 Server at localhost failed to start问题解决
第一次写博客,写个简单的好了 关于eclipse中web项目tomcat报错Server Tomcat v9.0 Server at localhost failed to start 问题 我的解决 ...
- SpringBoot报错 org.apache.catalina.LifecycleException: Protocol handler start failed
很多人在第一次创建运行SpringBoot项目的时候会报错 org.apache.catalina.LifecycleException: Protocol handler start failed ...
- sqlserver2008安装报错 “Previous releases of Microsoft Visual Studio 2008″ failed.
sqlserver2008安装报错 "Previous releases of Microsoft Visual Studio 2008″ failed. <Date: 2010-04 ...
- 2021-08-15nginx访问502,日志报错:connect() to 127.0.0.1:180 failed (13: Permission denied)解决
nginx访问502,日志报错:connect() to 127.0.0.1:180 failed (13: Permission denied)解决 安装启动nginx配置以后,访问报502错误,然 ...
- 解决Vue报错:[Vue warn]: Error in nextTick: “NotFoundError: Failed to execute ‘insertBefore‘ on ‘Node‘: T
解决Vue报错:[Vue warn]: Error in nextTick: "NotFoundError: Failed to execute 'insertBefore' on 'Nod ...
- rsync报错:some files/attrs were not transferred (see previous errors) (code 23) at main.c(1052) [sende
rsync 远程同步工具 rsync 主要用于备份和镜像.具有速度快.避免复制相同内容和支持符号链接的优点. rsync 和 scp 区别:用 rsync 做文件的复制要比 scp 的速度快, ...
- 服务器报错:“/usr/local/var/run/nginx.pid”failed
重启nginx的时候报错如上.我们根据提示的路径找过去,发现确实不存在nginx.pid,这种情况下,我们需要用: nginx程序路径+nginx -c nginx配置文件路径 例如: /usr/lo ...
最新文章
- Smart Card知识
- python 批量resize性能比较
- C#数组和集合专题4(Hashtable类)
- 【Pytorch神经网络理论篇】 03 Pytorch快速上手(三)张量的数据操作
- eks volumn s3_云顶棋弈研习社 游玩S3赛季 PBE注册、下载与汉化教程
- 封装 电流密度 重布线_具有周边硅通孔的晶圆级芯片封装有限元分析
- Python编程一定要注意的那些“坑”(六)
- 你不知道的 flex 技巧
- 卷积神经网络中feature map的含义
- 给你的页面加一个百度地图
- 软件项目管理 案例教程复习要点
- 李宏毅机器学习Lesson2——Logistic Regression实现收入预测
- 【已解决】Magisk提示需要修复运行环境怎么办? | 面具提示需要修复运行环境怎么办?
- 1997-2020年31省进出口总额
- ABAP 创建及修改采购申请
- 百度云 OCR 识别图片验证码
- 毕业三年,初心你忘记了吗?
- 【论文阅读】D19-1435——GEC问题解决的一种方法:PIE架构
- 蓝桥杯 历届试题 高僧斗法(Nim博弈)
- autoit3 试用