The
CVSROOT directory can be looked at but not modified by users; it should be owned by root and it would be a good idea to have a group, I use
cvsusers, for all the content of the
cvsroot directory. My repository looks like this:
Code:
ls -al /usr/local/cvsroot
total 52
drwxrwxr-x 13 root cvsusers 4096 Nov 3 2011 ./
drwxr-xr-x 24 root root 4096 May 12 2015 ../
drwxrwxr-x 3 root cvsusers 4096 Oct 20 2012 CVSROOT/
drwxr-xr-x 3 root cvsusers 4096 Oct 7 2009 county/
drwxr-xr-x 3 root cvsusers 4096 Nov 15 2011 general/
drwxrwxr-x 3 root cvsusers 4096 Oct 20 2012 gnis/
drwxrwxr-x 3 root cvsusers 4096 Jan 22 2012 ims/
drwxrwxr-x 6 root cvsusers 4096 Nov 3 2011 map/
drwxrwxr-x 3 root cvsusers 4096 Nov 3 2011 nawk/
drwxr-xr-x 3 root cvsusers 4096 Oct 7 2009 nhpn/
drwxrwxr-x 5 root cvsusers 4096 Sep 25 2012 recipes/
drwxrwxr-x 9 root cvsusers 4096 Jun 4 2010 topics/
drwxrwxr-x 3 root cvsusers 4096 Jun 30 2012 utils/
That content is the
CVSROOT directory and the project directories.
The CVSROOT directory looks like this:
Code:
ls -al /usr/local/cvsroot/CVSROOT
total 156
drwxrwxr-x 3 root cvsusers 4096 Oct 20 2012 ./
-rw-rw-r-- 1 root cvsusers 495 Oct 7 2009 .#checkoutlist
-rw-rw-r-- 1 root cvsusers 760 Oct 7 2009 .#commitinfo
-rw-rw-r-- 1 root cvsusers 1302 Oct 7 2009 .#config
-rw-rw-r-- 1 root cvsusers 602 Oct 7 2009 .#cvswrappers
-rw-rw-r-- 1 root cvsusers 1025 Oct 7 2009 .#editinfo
-rw-rw-r-- 1 root cvsusers 1141 Oct 7 2009 .#loginfo
-rw-rw-r-- 1 root cvsusers 1087 Oct 7 2009 .#modules
-rw-rw-r-- 1 root cvsusers 564 Oct 7 2009 .#notify
-rw-rw-r-- 1 root cvsusers 649 Oct 7 2009 .#rcsinfo
-rw-rw-r-- 1 root cvsusers 879 Oct 7 2009 .#taginfo
-rw-rw-r-- 1 root cvsusers 1026 Oct 7 2009 .#verifymsg
drwxrwxr-x 13 root cvsusers 4096 Nov 3 2011 ../
drwxrwxr-x 2 root cvsusers 4096 Oct 7 2009 Emptydir/
-r--r--r-- 1 root cvsusers 495 Oct 7 2009 checkoutlist
-r--r--r-- 1 root cvsusers 696 Oct 7 2009 checkoutlist,v
-r--r--r-- 1 root cvsusers 760 Oct 7 2009 commitinfo
-r--r--r-- 1 root cvsusers 961 Oct 7 2009 commitinfo,v
-r--r--r-- 1 root cvsusers 1302 Oct 7 2009 config
-r--r--r-- 1 root cvsusers 1503 Oct 7 2009 config,v
-r--r--r-- 1 root cvsusers 602 Oct 7 2009 cvswrappers
-r--r--r-- 1 root cvsusers 803 Oct 7 2009 cvswrappers,v
-r--r--r-- 1 root cvsusers 1025 Oct 7 2009 editinfo
-r--r--r-- 1 root cvsusers 1226 Oct 7 2009 editinfo,v
-rw-rw-rw- 1 root cvsusers 7713 Oct 20 2012 history
-r--r--r-- 1 root cvsusers 1141 Oct 7 2009 loginfo
-r--r--r-- 1 root cvsusers 1342 Oct 7 2009 loginfo,v
-r--r--r-- 1 root cvsusers 1087 Oct 7 2009 modules
-r--r--r-- 1 root cvsusers 1288 Oct 7 2009 modules,v
-r--r--r-- 1 root cvsusers 564 Oct 7 2009 notify
-r--r--r-- 1 root cvsusers 765 Oct 7 2009 notify,v
-rw-r--r-- 1 root cvsusers 62 Jun 19 2010 passwd
-r--r--r-- 1 root cvsusers 649 Oct 7 2009 rcsinfo
-r--r--r-- 1 root cvsusers 850 Oct 7 2009 rcsinfo,v
-r--r--r-- 1 root cvsusers 879 Oct 7 2009 taginfo
-r--r--r-- 1 root cvsusers 1080 Oct 7 2009 taginfo,v
-rw-rw-rw- 1 root cvsusers 0 Oct 7 2009 val-tags
-r--r--r-- 1 root cvsusers 1026 Oct 7 2009 verifymsg
-r--r--r-- 1 root cvsusers 1227 Oct 7 2009 verifymsg,v
Note the
passwd file: all CVS users are required to use a password, not their log in password, a defined encrypted password to use CVS. You may not want to mess with that, but it is a layer of security to keep the unwashed out of project files (let me know if you want the password generator utility I use to create CVS user passwords). The
passwd file contains
Code:
userid:encrypted_password
one line per authorized CVS user.
You will want the users to create a file in their home directory named
.cvspass:
Code:
touch .cvspass
chmod 600 .cvspass
The first time they connect to CVS with the password function active they will be prompted for their password and it will be saved in their home directory
.cvspass. The file mode is read-write for only the individual user (that's the 600 mask).
You will want to use the
groupadd utility to create a group for CVS users. You will want to use the
groupmod utility to add userids to that group (you can also directly edit
/etc/group to add userid to the group line separated by colons).
Once added, you will want to change the user and group of all the files and directories
Code:
cd /usr/local/
chown -R root:cvsusers cvsroot
Of course, you have to be root to do any of the above (use
su -,
sudo or whatever floats your boat).
Assuming you're using the server setup, you should have it defined system-wide or on a per CVS user basis such that the environment variable looks like this:
Code:
echo ${CVSROOT}
:pserver:userid@fubar.lan:/usr/local/cvsroot
You would want to define that the individual user's home directory
.profile file (better than system-wide) like so:
Code:
# set up CVSROOT
CVSROOT=:pserver:${USER}@fubar.lan:/usr/local/cvsroot
export CVSROOT
fubar.lan is my LAN server, yours, of course, will vary.
I know it's a little complicated (it is actually documented in the CVS docs) but it does work. Just be careful because you're going to be working as root, so look at the man pages if you don't fully understand things like groups and make a back up file before you twiddle.
Hope this helps some.