We generally access our CVS server via Eclipse. One of our teammates, steveo
created a new package Testing
under our Java src
folder for project ProjectName
.
Afterwards, this caused failures with all checkouts for ProjectName
.
The server reported an error while performing the "cvs checkout" command.
: cvs checkout: failed to create lock directory for `/app/cvs/repository/Main/ProjectName/src/Testing' (/app/cvs/repository/Main/ProjectName/src/Testing/#cvs.lock): Permission denied
: cvs checkout: failed to obtain dir lock in repository `/app/cvs/repository/Main/ProjectName/src/Testing'
: cvs [checkout aborted]: read lock failed - giving up
I putty'd to the CVS server and did an ls -l
on the src
folder
drwxrwxr-x 5 root cvs 4096 May 19 12:05 com
drwxrwxr-x 3 steveo steveo 4096 May 19 12:05 Testing
I sudo su
, backed up to the project folder, and ran chgrp -R cvs ProjectName
.
drwxrwxr-x 5 root cvs 4096 May 19 12:05 com
drwxrwxr-x 3 steveo cvs 4096 May 19 12:05 Testing
This has solved the issue for now... until another user creates a package.
What is causing this and how do I default them all to cvs
instead?
The answers to this similar SO question were not helpful.
Figured it out and posting the answer for posterity.
I was originally going to set the repository folder to group cvs
and make it sticky via chmod g+s /app/cvs/repository/
, but that is not recursive and I don't know that I want to mess with that.
Default group id (GID) was not cvs
for the users. The solution is a bit of a workaround as we're using Active Directory as our account login. Luckily, we're only using this server for CVS, which makes the solution simple.
This must be done for each account and each new account.
sudo su
cd \home\{username}
echo "newgrp cvs" >> .profile
That will set the default group to cvs
for the offending accounts on log-in and I can call it a day... and eventually migrate to Git / BitBucket.