Search code examples
mavenjenkinsfile-permissionscvsmaven-release-plugin

"could not open lock file: Permission denied" when branching a project


We're trying to automate our build with the Maven release plugin. We are using Jenkins and CVS too.

Unfortunately we get an error when branching the project:

[INFO] Branching release with the label test_branch_jenkins...
[INFO] Executing: /bin/sh -c cd "/data/jenkins/jenkinshome/workspace/Test release plugin  with test project/our-project-parent" && cvs -z3 -f -q tag -b -F -c test_branch_jenkins
[INFO] Working directory: /data/jenkins/jenkinshome/workspace/Test release plugin  with test project/our-project-parent
[…]
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.0:branch (default-cli) on project our-project-parent: Unable to branch SCM
[ERROR] Provider message:
[ERROR] The cvs branch command failed.
[ERROR] Command output:
[ERROR] cvs [tag aborted]: 
    could not open lock file `/srv/cvsrepo/our-project-parent/our-project-frontend/src/main/resources/META-INF/,MANIFEST.MF,':
        Permission denied

Do you know what the problem could be here? Is it CVS related or rather a problem with the file system?


Solution

  • The problem was that indeed the write permission on the file system was not granted for this file. Hence the error message Permission denied.