tags:

views:

130

answers:

2

I am working with a cvs repository at a clients site, and I do a checkin via ssh (CVS_RSH=ssh).

My default group is "foo", and I am also a member of "bar".

The repository should be accessible by members of group "bar". However, whenever I do a checkin, it changes the group of the file I checked in to "foo". This makes the file readonly to people who are only in group "bar".

Is there a way to tell cvs to keep the correct group setting? Or do I need to make a special version of ssh to execute "newgrp bar" over the connection? Or is this just an ancient version of CVS that needs to be updated.

+2  A: 

Well, CVS has really no file metadata out of binary and executable.

There are a few things you can do

  • do a chmod g+s bar on the server directory where you want it to stay bar
  • write a small shell wrapper which will replace the real cvs, do a chgrp and call the real cvs afterwards.
mat
A: 

Possible answers:

  • use sg or newgrp to switch groups on login
  • use chmod -R g+s on the repository in advance to arrange proper access
  • switch to using the pserver and map everyone to the same user under the skin (implies some maintenance though)

The first answer is the only really useful one if you can't make changes to how the repository is operated. On Linux, it just depends on your ability to switch group IDs for the current session, which both of the given commands enable.

In the past, I've tended to favor the third approach for repositories that I manage.

Thomas Kammeyer