Today, when we synchronize data, we will prompt Rsync: failed to set times on “XXX”: operation not permitted. Generally speaking, if the server time is not right or the permissions are not set properly, the following script house editor will sort out some information for you
Method 1:
The reason why Rsync: failed to set times on “XXX”: operation not permitted appears is that the folder (or file) XXX has no operation permission. If the user performing synchronization is root, there will not be such a problem. However, Rsync can also synchronize without using root. Even if – O, – G is used, the file users and groups synchronized to the destination folder will become synchronized users, but the file permissions can be retained after using – P. When the destination folder (or file) XXX has been modified so that the owner is not the user of Rsync, even if the permission of XXX is 777, the above error will occur
Method 2:
When I use Rsync to synchronize, there is a synchronization error from my local machine to the remote server machine, which prompts
Rsync: failed to set times on “directory” operation not permitted (1)
where directory is a directory on the remote target server
This problem is because of the uid and GID you specified in the/etc/rsync.conf file. In this way, the owner and group of the directory you want to synchronize the file should be the uid and GID specified in the/etc/rsync.conf file.
in this way, the Rsync: failed to set times on class will not be wrong
Here, the permission of all backup files of my source station is ftpuser. Ftpuser
But the uid and GID configured in/etc/rsyncd.conf on my backup side are all wwwad users
So here I have the above error, so after the uid and GID in/etc/rsyncd.conf are changed to ftpuser, I will not report the above error if I restart sersync
(1) Error in Rsync pushing file to target server before modification:
(2) Go to the target server and check the/etc/rsync.conf file to see what uid and GID are
(3) Then, according to the configuration file, the target directory of the target server, the owner and group of the chown directory
After the above settings, it is OK and the synchronization is normal
Method 3
rsync: failed to set times on “/.” (in module): Operation not permitted (1)
This is rsyncd.conf where read only = no is not OK, because the default value is yes
Method 4: under windows, it is generally caused by the incorrect setting of directory permissions on the server side. In general, svccwrsync users need to join the synchronization directory and give all permissions, or set svccwrsync as administrator permission directly (it is better to prohibit the remote login of svccwrsync user)
Similar Posts:
- Rsync Real-time Error: rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1052) [sender=3.0.9]
- rsync error: some files/attrs were not transferred (see previous errors) (code 23)
- Solution of Su command cannot set groups: operation not permitted
- E09 Error: sudo: effective uid is not 0, is sudo installed setuid root?
- [Solved] PHP write file permission failure: file_put_contents: failed to open stream: Permission denied
- [Solved] Permissions 0755 for ‘/data/user/lxb/.ssh/id_rsa’ are too open.
- [How to Fix] file_put_contents failed to open stream
- [Solved] Mac Error: PermissionError: [Errno 1] Operation not permitted: ‘xxxx’
- How to Solve MySQL Startup error: mysql-bin.index not found (Errcode: 13)
- [Solved] Rsync Error: gid 4294967295 (-1) is impossible to set on…