info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: read lock failed


From: david
Subject: Re: read lock failed
Date: Wed, 17 Apr 2002 11:06:57 -0500 (CDT)

> 
> Hi all,
> 
> We need some help related to access rights to cvs subdirectories.
> 
> We have got  a huge tree in the CVS Repository
> and we have given  specific group access  to specific  subdirectories.
> 
> What we need is  though some users do not belong to  some groups,
> they should be able to checkout files from any subdirectory  to view,
> but should not be able to  checkin.
> 
> ( when a user doestnt belong to the group and   tries to  checkout files
> from that subdirectory
> he gets an error:
> cvs server: failed to obtain dir lock in the repository
> cvs [server aborted] : read lock failed , giving up.
>
CVS creates read locks in directories when reading them, preventing
any other CVS process from changing that directory.  In order to
allow read-only access to a given user, that user has to be able
to create a read lock to a directory, but cannot have write permission
in that directory.  To do this, it is therefore necessary to separate
the lock and repository directories.

First, make absolutely sure there are no versions of CVS that are
1.9 or older, as these do not follow the LockDir protocol, and
if any of these are running you will have two parallel locking
schemes that are independent of each other, and could corrupt
the repository.  You should have replaced these anyway, since
they're not Y2K-compliant and you will get occasional date problems.

Second, create a world-writable directory such as /usr/cvs/locks.

Third, check out the CVSROOT module and edit the file "config".
Add the line
LockDir=/usr/cvs/locks 
(or whatever directory you have created).  Type this exactly without
involving space, as otherwise CVS will fail to recognize it.  Check
in the new "config", and CVS will then start using that lock
directory.

(You probably should tell everybody to stop using CVS during step
three, as there is a potential problem if some processes are using
locks in the repository and some in the new lock directory.)

CVS should handle it from there, including creating subdirectories
as needed.

David H. Thornley                        | If you want my opinion, ask.
address@hidden                       | If you don't, flee.
http://www.thornley.net/~thornley/david/ | O-



reply via email to

[Prev in Thread] Current Thread [Next in Thread]