Uploaded image for project: 'Nuxeo ECM Build/Test Environment'
  1. Nuxeo ECM Build/Test Environment
  2. NXBT-2892

Permission denied issue when running a pipeline as the jenkins user

    XMLWordPrintable

    Details

    • Type: Problem
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Jenkins X

      Description

      See http://jenkins.platform.34.74.59.50.nip.io/job/nuxeo/job/nuxeo/job/task-NXP-27430-platorm-simple-pipeline/27/console

      sh: /home/jenkins/workspace/XP-27430-platorm-simple-pipeline@tmp/durable-cdf22e09/jenkins-log.txt: Permission denied
      sh: /home/jenkins/workspace/XP-27430-platorm-simple-pipeline@tmp/durable-cdf22e09/jenkins-result.txt.tmp: Permission denied
      touch: cannot touch ‘/home/jenkins/workspace/XP-27430-platorm-simple-pipeline@tmp/durable-cdf22e09/jenkins-log.txt’: Permission denied
      mv: cannot stat ‘/home/jenkins/workspace/XP-27430-platorm-simple-pipeline@tmp/durable-cdf22e09/jenkins-result.txt.tmp’: No such file or directory
      touch: cannot touch ‘/home/jenkins/workspace/XP-27430-platorm-simple-pipeline@tmp/durable-cdf22e09/jenkins-log.txt’: Permission denied
      touch: cannot touch ‘/home/jenkins/workspace/XP-27430-platorm-simple-pipeline@tmp/durable-cdf22e09/jenkins-log.txt’: Permission denied
      

      The agent used is "jenkins-maven-java11-nuxeo" which creates a jenkins user and uses it in the Docker image, see https://github.com/nuxeo/nuxeo-jenkins-x-builders/blob/bde46e5a713ed07d6a1ff33db26a56acc7bb35fd/builder-maven-java11-nuxeo/Dockerfile

      We want to run the pipelines as jenkins to not be as root.

      It seems that the scm checkout is not done in the builder's container, thus not as jenkins, creating the /home/jenkins/workspace directory with insufficient permission for the jenkins user.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: