今天在同步数据的时候提示rsync: failed to set times on “xxxx”: Operation not permitted,一般来说要不是服务器时间不对或者权限没有设置好,下面小编就为大家整理了一些资料
第一种方法:
出现rsync: failed to set times on “xxxx”: Operation not permitted的原因大致是对文件夹(或文件)xxxx没有操作权限。如果执行同步的用户是root,是不会有这样的问题,但是rsync也可以不使用root用户来进行同步,不使用root用户的情况下,即使使用了-o,-g,同步到目的文件夹的文件用户和组都变成了同步使用的用户,但是用-p后文件权限可以保留。当目的文件夹(或文件)xxxx事后做过修改使owner不是rsync使用的用户,即使xxxx的权限是777,也会出现上述错误。
第二种方法:
当我使用rsync同步的时候,从我本地的机器到远程服务器的机器上,同步出现错误,提示
rsync: failed to set times on “directory” Operation not permitted (1)
其中directory是远程目标服务器上的一个目录。
这个问题就是,因为 /etc/rsync.conf 文件内,你指定的uid 、 gid 的问题, 这样,你同步文件要写的目录 ,他的属主和属组 都要是/etc/rsync.conf 文件内指定的uid 、 gid ,
这样就不会 rsync: failed to set times on 之类的错误了 !
(1)修改前,rsync 推送文件到目标服务器出错 :
(2)去目标服务器查看 /etc/rsync.conf 文件,看uid和gid分别是什么 :
(3)然后根据配置文件,把目标服务器的目标目录,chown 目录的属主和属组
以上设置后,就OK 了 ,同步正常 :
方法三
rsync: failed to set times on "/." (in module): Operation not permitted (1)
这个是rsyncd.conf 里面 read only = no 注销也不行,因为默认值是yes
方法四: windows下面一般都是因为服务器端目录权限设置不正确引起的。一般情况下SvcCWRSYNC用户需要加入同步目录中并给所有权限或者直接将SvcCWRSYNC设为管理员权限也行(最好禁止SvcCWRSYNC这个用户远程登录)
小编注:如果更改的权限什么的,需要重启rsync服务。经过测试完美解决问题。
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
更新日志
- 群星.1993-滚石九大天王十二出好戏·贺岁齐唱【滚石】【WAV+CUE】
- 黑神话悟空上品虫校尉精魄获取方法一览|上品虫校尉精魄收集攻略
- 《指环王:夏尔的传说》推迟至2025年初发行
- 黑神话悟空上品蝎太子精魄获取方法一览|上品蝎太子精魄收集攻略
- 银霞.1977-《台北66电影原声带》台湾复刻版[WAV+CUE]
- 银霞.1980-《你那好冷的小手》台湾珍藏纪念版[WAV+CUE]
- 王菲.2006《菲常好听》引进版[低速原抓WAV+CUE]
- 《三日危情独家的记忆》女角色介绍
- 《天国拯救》拉泰比武大会攻略
- 任天堂推出《马里奥惊奇》NS捆绑包 10月24日发售
- 《孤岛惊魂》能否逆转育碧颓势?曝系列新作正招兵买马
- 天命人呼叫战术轰炸!玩家自制《黑神话:悟空》轰炸机Mod
- 群星.1992-滚石九大天王·十二出好戏【滚石】【WAV+CUE】
- 群星.1994-新滚石九大天王之年度大丫滚石】【WAV+CUE】
- 坣娜.1998-别恋【非常喜】【WAV+CUE】