Configuring CVSPermissions

One time configuration

CVSPermissions requires a one-time configuration that can be done anytime after a CVS repository has been created. This configuration is done using the configuration script cvspermsetup.sh. This script must be executed after you have logged into CVS. The sequence of steps is shown below.


vivek@chintu>export CVSROOT=:pserver:vivek@chintu:/cvsroot
vivek@chintu>cvs login
(Logging in to vivek@chintu)
CVS password:
vivek@chintu>cvspermsetup.sh

This script will create/modify the necessary files in the CVSROOT module of the repository to enable CVSPermissions.

Setting up User privileges

New users in CVSPermissions belong to three categories.

  1. Regular users: Users who have complete commit and tagging privileges for all the directories in the repository.

  2. Restricted users: Users who have restricted commit and tagging privileges to some of the directories in the repository.

  3. Read only users: Users who have read-only access privileges to the entire repository. They will not be able to commit/tag files to the repository.

Adding a New User

For all the three types of users, the first step is to create an Operating system (OS) user. After an OS user has been created, the cvspermuseradd.sh script will help setup the different kinds of users

  1. Regular Users: Regular users can be setup using the following command

     


    vivek@chintu>cvspermuseradd.sh -n USERNAME 

  2. Restricted Users: Restricted users can be added using the following command

     


    vivek@chintu>cvspermuseradd.sh -s USERNAME 

    [Note]Note

    This will setup a restricted user but the actual directory level permissions for the user is not setup now. The default setup will create a user with NO commit permission to the entire repository but complete read only access to the entire repository. A different script will setup the actual directory permissions.

  3. Read-only Users: Read-only users can be setup using the following command

     


    vivek@chintu>cvspermuseradd.sh -r USERNAME 

Removing an existing user

An existing user can be removed from CVS using the following command


vivek@chintu>cvspermuserdel.sh USERNAME

This script will revoke all access permissions to an existing user in CVS. Further, this command will also remove all the directory restriction settings for a restricted user.

Enable/Disable user(s)

There are situations when a user has to be temporarily disabled from committing/tagging files to the repository. At a later point in time the same user has to be re-enabled with prior access restrictions intact. In such a situation, the following command can be used.

Disable user(s)


vivek@chintu>cvspermuserctl.sh -d USERNAME

Enable user(s)


vivek@chintu>cvspermuserctl.sh -e USERNAME

Setting up access rights for Restricted Users

This section deals with commands that will help establish the access permissions for restricted CVS users. As described before, access control is at the directory level within a repository. Access includes, committing files and tagging files. The command cvspermuserdir.sh can add or remove directories to which the user has commit rights.

Add access rights for a directory


vivek@chintu>cvspermuserdir.sh USERNAME -a DIRNAME

Revoke access rights for a directory


vivek@chintu>cvspermuserdir.sh USERNAME -d DIRNAME

[Note]Note

The directory name must be a full path of the directory name including the repository starting prefix. A partial directory name will result in allowing write access to directories that has this partial name as part of its path.

Google
Webwww.sanchivi.com
CVSPermissions