CVS Import Permissions

Giorgos Keramidas keramida at ceid.upatras.gr
Mon Jan 30 02:24:55 PST 2006


On 2006-01-30 15:52, david bryce <davidbryce at fastmail.fm> wrote:
> Hi All,
>
> I am having some confusion regarding the way CVS works with permissions
> under unix when importing a new project. Currently, when I import a
> project, I get this sort of permissions on the project directory:
>
> drwxr-x---  2 jim   cvs   512 Jan 27 12:31 test_proj
>
> Notice that the group (cvs) is not granted write access. Is this the
> way it's supposed to work?

That depends on what your `umask' currently is.

> Do I have to use chmod to grant write access to the group every time I
> do an import?

No.  The correct way to fix this is to set CVSUMASK in your shell
environment, and then import the files :)

Of course, now that the import is done, you can still use a bit of
``repository hackery'' to set the g+w bit for the checked in sources.

> Or is my CVS not configured correctly?

Your cvs is fine.  The default umask is 022, which strips off g+w
permissions from all newly created files; including the ones CVS creates
in the repository.

> If I don't grant write access to the group on that directory, every
> check in fails with a "could not open lock file
> `/usr/local/cvs/test_proj/,test.txt,': Permission denied". I tried
> setting the LockDir in the config file to a world-writable directory,
> but this doesn't seem to solve the problem when trying to check-in.

The RCS files inside `/usr/local/cvs/test_proj' have no group-write
permission.  You can fix this by something like this:

    $ cd $CVSROOT
    $ find . -print0 | xargs -0 chmod g+w

This is the sort of ``repository hackery'' I mentioned above.



More information about the freebsd-questions mailing list