CVSROOT and file permissions

There is a special project called CVSROOT at the root level of each CVS repository. This project contains CVS configuration information and administration scripts. As is the case for all CVS projects, these files are stored in the form of RCS(-like?) files with a ,v extension.

It’s common to store working copies of some of these files in the same project directory. For example, our scripts that publish commit email messages and trigger Hudson builds are assumed to be available from this directory.

To support this, CVS has a special config file called checkoutlist. When a change to any of the files in CVSROOT is committed, CVS will automatically checkout working copies of all of the files listed in checkoutlist. But, when it checks out each file, it sets the permissions to those of the associated ,v file. So, if you want a Shell script to be executable, you must be sure that the associated ,v file is executable.

For example, to ensure that is executable, you must ensure that,v is executable:

[cvs@shroma CVSROOT]$ ls -l trigger*
-r-xr-xr-x  1 cvs cvs  842 Mar 12 15:21
-r-xr-xr-x  1 cvs cvs 2874 Mar  6 11:32,v
[cvs@shroma CVSROOT]$

In theory, if the file is executable at the time of check-in, then the ,v file created will also be executable.

It's only fair to share...
Share on Facebook
Tweet about this on Twitter
Share on LinkedIn

Leave a Reply