Академический Документы
Профессиональный Документы
Культура Документы
xml
Linux/Articles/CVS/pserver setup
This gives necessary information about the directory permissions. If you are moving your
files from a windows file system you need to set the permissions manually you can search
for directories by using the following command under CVSROOT
find . -type f | xargs ls -l
this will give you the files and its permissions. There is an example below
-r--r--r-- 1 kguclu cvsgrp 2003-05-24 21:55 ./project/file1,v
-r--r--r-- 1 kguclu cvsgrp 2003-05-24 21:55 ./project/file2,v
-r--r--r-- 1 cvs cvsgrp 2003-05-24 20:59 ./project/file3,v
-r--r--r-- 1 cvs cvsgrp 2003-05-24 20:59 ./project/file4,v
-r--r--r-- 1 cvs cvsgrp 2003-05-24 21:33 ./project/file5,v
-r--r--r-- 1 cvs cvsgrp 2003-05-24 21:36 ./project/test/file1,v
-r--r--r-- 1 cvs cvsgrp 2003-05-24 21:36 ./project/test/file2,v
-r--r--r-- 1 cvs cvsgrp 2003-05-24 21:36 ./project/test/file3,v
-r--r--r-- 1 kguclu cvsgrp 2003-05-24 21:57 ./project/test1/file1,v
so if your stucture doesnot look like the same you should change them appropriately but
there are some files under CVSROOT directory which has different permissions for that reas
cvs guide "http://www.cvshome.org/docs/manual/cvs_2.html#SEC13"
If your repository has different permissions use the following commands in order to set the
right permissions use
find . -type d | xargs chmod 775
Step 3.2
If you are starting up a new project simply use the following to create a new repository from
scratch.
cvs -d /usr/local/cvsroot init
Step 4
To inherit the parent directory permission to the newly created sub dirs use chmod g+s to set
the SGID bit of the directory. use the following command to set the SGUID bit of sub
directories
find . -type d | xargs chmod g+s
Step 5
Make sure /etc/services contains the line
cvspserver 2401/tcp
Step 6
Depending on your linux distribution you can may need to edit different configuration files.
If your system has /etc/inetd.conf edit that file add the following line (only one line) and
restart inetd by "killall -HUP inetd"
cvspserver stream tcp nowait root /usr/bin/cvs cvs
--allow-root=/usr/local/cvsroot pserver
if you donot have /etc/inetd.conf this means that your linux distribution uses xinet.d create
/etc/xinet.d/cvspserver file and Inside that file paste the following and restart your xinetd:
service cvspserver
{
disable = no
protocol = tcp
socket_type = stream
wait = no
user = root
server = /usr/bin/cvs
server_args = -f --allow-root=/usr/local/cvsroot pserver
passenv =
groups = yes
}
Step 7
If you skip or forget that step you get the following message
cvs server: failed to obtain dir lock in repository /usr/local/cvsroot
In order to fix this problem edit CVSROOT/config and add the following
LockDir=/var/lock/cvs
create a cvs lock directory and set the permission of the directory, allow write access to the
group members
mkdir /var/lock/cvs
chgrp -R cvsgrp /var/lock/cvs
Step 8
To test, go to your home directory and enter:
cvs -d :pserver:cvs@tiger:/cvs login
cvs -d :pserver:cvs@tiger:/cvs co .