[Ilugc] Re: cvs permission changes

  • From: binand@xxxxxxxxx (Binand Sethumadhavan)
  • Date: Thu Jun 23 13:13:46 2005

On 23/06/05, Bala Vignesh <kbalavignesh@xxxxxxxxx> wrote:

Now again the problem is continued
and also i get error "Failed to lock directory .... " while checkout the cvs
repository
(actually first time it get all files but second time it shows this error)

Let me give you some general advice to avoid CVS file permission problems.

All users of CVS should be members of the same group (say, cvs). Their
primary groups could be different (your distro default).

binand@snape[~]:[03:39](20) id binand
uid=3001(binand) gid=3001(binand) groups=3001(binand),601(cvs)

Your CVSROOT (say /var/cvsroot) should be mode/owner 2770,
anyuser:cvs. In my case, it looks like this:

binand@snape[~]:[03:41](22) ls -ld /var/cvsroot/
drwxrws---    3 root     cvs     4096 Apr 23 06:44 /var/cvsroot/

If you already have a cvs repository, the best thing to do would be to run:

find /var/cvsroot -type d | xargs chmod 2770
find /var/cvsroot | xargs chown root:cvs
find /var/cvsroot -type f | xargs chmod 660

If you are running cvs pserver via xinetd, set the umask option to 006
in your /etc/xinetd.d/cvspserver file. If your users use cvs over
other means (say rsh/ssh), set the umask to 006 in your shell
initialization file (~/.bashrc for bash).

Unless you really know what you are doing (ie, have read and
understood the CVS manual completely), do not fiddle around with files
in /var/cvsroot/yourproject/CVSROOT. The defaults there are usually
fine to start a collaborative development environment.

Binand

Other related posts: