Skip to main content
Department of Information Technology

Local CVS-repository

If you want to create a CVS-repository for temporary use or for a short time, like assignments for a course, it is usually enough to create a local CVS-repository. The CVS-server is reserved for more long-term use like projects or when external users without UNIX-accounts must have access.

It is recommended that ACL:s (Access Control List) are used to make sure the users get correct read/write access to the files in the repository.

Creating the repository

In this example, the user 'user1' create the repository and give the users 'user2' and 'user3' access to the repository. The disk-quota is not dependent on where the files are, it depends on who owns the actual file.

Note that the order is important, if cvs init is executed before setfacl the permissions will be wrong.

{user1}% export CVSROOT=:local:/home/user1/CVS
{user1}% mkdir CVS
{user1}% setfacl -s user::rwx,group::---,mask:rwx,other:--- CVS
{user1}% setfacl -m d:user::rwx,d:group::---,d:mask:rwx,d:other:--- CVS
{user1}% setfacl -m user:user1:rwx,d:user:user1:rwx CVS
{user1}% setfacl -m user:user2:rwx,d:user:user2:rwx CVS
{user1}% setfacl -m user:user3:rwx,d:user:user3:rwx CVS
{user1}% cvs init

Please note that the other users does not have to be able to read the directories above the repository, they only need the x-bit on the repository.

{user2}% ls -l ~user1
/home/user1: Permission denied
total 8
{user2}% ls -ld ~user1
drwx--x--x 71 user1 guest 3584 Mar 24 13:11 /home/user1
{user2}% ls -l ~user1/CVS
total 3
drwx--- ---+ 3 user1 guest 1024 Mar 24 13:11 CVSROOT

As long as you run on our UNIX-systems you can keep CVSROOT set to :local:/home/user1/CVS, but if you need remote access you will have to change to the ":ext:"-method instead

{user3}% export CVSROOT=:ext:user3@someserver.it.uu.se:/home/user1/CVS
{user3}% export CVS_RSH=ssh

Add / remove users.

Updated  2007-04-12 19:25:45 by Joel Fredrikson.