今天在同步数据的时候提示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服务。经过测试完美解决问题。
更新日志
- [雨果唱片]李冰《地方民歌·戏曲系列-爱的颂歌》WAV
- 《模拟人生》真人电影官宣!玛格特·罗比担任制片人
- 《星战绝地》系列玩家数超4000万!续作表现超预期
- EA称AI是其业务核心!能提高开发效率、节约成本
- 《十年经典成名好歌 高品质最佳音乐 2CD》[WAV/分轨][1GB]
- 《8个男人的故事 2CD》[WAV/分轨][1GB]
- 《粤语超白金 百听不厌的经典金曲 2CD》[WAV/分轨][1.3GB]
- 群星.1994-全世界精丫华星】【WAV+CUE】
- 杜德伟.1997-知.解2CD【滚石】【WAV+CUE】
- 群星.2022-一不小心喵上你原声大碟【TME影音】【FLAC分轨】
- 《战锤40K星际战士2》卡在正在加入服务器解决方法
- 《勇者斗恶龙怪物仙境3》玩法内容介绍
- 《幸福工厂》无限报错解决方法
- 交错战线原始交易所推荐角色一览
- 战锤40K星际战士2战术职业介绍|战术职业技能效果一览