CVS Error: failed to create lock directory... Permission denied

AnnanFay picture AnnanFay · May 5, 2011 · Viewed 25.7k times · Source

I'm using using TortoiseCVS to access the CVS server. I get the following error:

In D:\source\foo: "C:\Program Files\CVSNT\cvs.exe" -q update -P -d
CVSROOT=:ssh:[email protected]:/home/cvsroot

cvs update: failed to create lock directory for `/home/cvsroot/foo' (/var/lock/cvs/foo/#cvs.lock): Permission denied
cvs update: failed to obtain dir lock in repository `/home/cvsroot/foo'
cvs [update aborted]: read lock failed - giving up

Error, CVS operation failed

I had this problem before and managed to fix it, however this time I've not been able to figure it out. I believe it's related to different people committing files with their own ownership.

After reading a few articles online I've tried changing /home/cvsroot and /home/cvsroot/foo to 777 permissions, and recursively changing the ownership of /home/cvsroot/ to cvs:cvs (of which I am a member).

Answer

Danilo Tommasina picture Danilo Tommasina · May 6, 2011

The lock file is being created in /var/lock/cvs/foo/ you should check the permissions of that directory.