rsync报错: Operation not permitted (1)

简介: [rsync报错:rsync: chgrp “.initial-setup-ks.cfg.jaXlVz” (in backup) failed: Operation not permitted (1)]问题背景:在配置好rsync服务和客户端后,客户端从服务端拉取是正常的,但从客户端推送到服务端报错。a,单独推送目录会报这个错误rsync: recv_generator: mkdir “opt” (in backup) failed: Permission denied (13)

[rsync报错:rsync: chgrp “.initial-setup-ks.cfg.jaXlVz” (in backup) failed: Operation not permitted (1)]

问题背景:在配置好rsync服务和客户端后,客户端从服务端拉取是正常的,但从客户端推送到服务端报错。

a,单独推送目录会报这个错误

rsync: recv_generator: mkdir “opt” (in backup) failed: Permission denied (13)

[root@jxl ~]# rsync -avz aa.txt rsync_backup@192.168.81.230::backup
sending incremental file list
aa.txt
rsync: chgrp ".aa.txt.rn3eFN" (in backup) failed: Operation not permitted (1)
sent 96 bytes  received 125 bytes  442.00 bytes/sec
total size is 3  speedup is 0.01
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@192.168.81.230::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

不用-a确实解决了,但是经过检查配置文件发现fake super配置参数写成了fake supper因此导致没有root权限。

因此使用-a必须具备fake supper = yes的配置参数才可以。


目录
相关文章
|
存储
openzfs draid是什么
openzfs draid是什么
3603 0
openzfs draid是什么
|
Kubernetes 搜索推荐 前端开发
containerd 镜像构建工具 -- nerdctl 和 buildkit
containerd 镜像构建工具 -- nerdctl 和 buildkit
9675 0
|
1月前
|
C++ Windows
【新版解释】Microsoft Visual C++ 2015-2022 Redistributable (现已统称为 Visual C++ v14 Redistributable)安装
Microsoft Visual C++ 2015-2022 Redistributable(现已统称为 Visual C++ v14 Redistributable)是 Windows 系统中用于运行使用 Visual Studio 开发的 C++ 应用程序所需的核心运行时组件。
|
Prometheus Kubernetes 负载均衡
Opentelemetry collector用法
本文详细介绍了Opentelemetry Collector的使用方法及其各个组件(receiver、processor、exporter、connector和服务配置)的功能与配置。Collector的核心组件通过官方仓库提供丰富的实现,涵盖了认证、健康监控等功能。
3229 63
Opentelemetry collector用法
|
XML Java API
Android翻转动画(卡片翻转效果)
本文介绍了如何实现卡片翻转动画效果,通过Android中的ObjectAnimator结合不同插值器(LinearInterpolator、AccelerateInterpolator、DecelerateInterpolator)完成平滑过渡。示例中以按钮点击触发动画,核心逻辑包括判断视图可见性、设置旋转角度及处理初始Bug(如第一次点击异常)。最终提供完整代码(Java与XML布局),并指出将按钮事件替换为屏幕监听即可满足右滑触发需求。适合初学者学习动画实现原理。
619 0
|
数据安全/隐私保护
网络文件夹目前是以其他用户名和密码进行映射的——映射盘更换登录用户名问题
网络文件夹目前是以其他用户名和密码进行映射的——映射盘更换登录用户名问题
6739 0
网络文件夹目前是以其他用户名和密码进行映射的——映射盘更换登录用户名问题
|
缓存 Linux 测试技术
安装【银河麒麟V10】linux系统--并挂载镜像12
【7月更文挑战第12天】安装【银河麒麟V10】linux系统--并挂载镜像
8791 0
|
数据安全/隐私保护 Linux 网络安全
|
Linux Windows
胆战心惊-Kernel Panic -- not syncing: attempted to kill init
关闭了Redhat,重新启动,就遇到Kernel Panic -- not syncing: attempted to kill init,并有这样的提示:CPU has been disabled by guest os. Power off or resset。
2877 0
|
监控 算法 iOS开发
Xcode调试内存最新理解
【8月更文挑战第12天】在Xcode中进行内存调试对确保iOS应用的稳定性和性能至关重要。主要利用Instruments套件内的工具如Leaks检测内存泄漏,Allocations追踪内存分配详情,及Memory Graph Debugger提供直观的内存结构视图。Xcode还支持内存图视图以了解对象布局与引用,动态内存分析实现实时监控,及符号化调试信息帮助定位问题源代码。最佳实践包括遵循内存管理原则、定期调试、优化代码逻辑,以及学习优秀代码案例。通过这些技术和策略,开发者能有效管理和优化应用的内存使用。
1143 0