I have multiple developers trying to rsync files (symfony php projects) to the same remote location. This has been setup as follows:
- Each user has their own login on the remote server
- Each user is a member of the same group on the server, say "mygroup"
- Files locally and at the rsync destination are owned by a user and the group. E.g. someuser:mygroup
As far as I am aware you must own a directory in order to set its access and modification times to an arbitrary value, being a member of the owning group is not enough. For this reason if user A tries to rsync directories owned by user B rsync outputs the following errors:
rsync: failed to set times on "/some/path": Operation not permitted (1)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1058) [sender=3.0.5]
So, what is the correct way to setup users & groups when multiple users rsync to the same remote location?