2

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?

ekad
  • 14,436
  • 26
  • 44
  • 46
Slate8
  • 139
  • 1
  • 4

1 Answers1

0

What Let_Me_Be said then deploy from Git (or Mercurial) to testing or staging then rsync from there to live. Better still use something like Hudson/Jenkins to manage the whole shooting match for you.

PurplePilot
  • 6,652
  • 7
  • 36
  • 42
  • Thanks for the suggestions - this is a solution but still feels like a bit of a work-around to me. I would imagine if we went this route we would will have the same problem should the git pull or svn update or similar need to change a folders timestamp. I was hoping for an answer on the correct way to setup linux users and groups to allow us to work in the way we need, but it may just be that it is not possible. Thanks for all the suggestions, they are appreciated. – Slate8 Jun 29 '11 at 12:38