Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-71453

Git plugin fails with ReadonlyRootFilesystem when tmp is mounted as noexec

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Blocker Blocker
    • git-plugin
    • None
    • jenkins:2.387.1
      java 8
      Git Version 4.8.2

      I have deployed the Jenkins container in 
      ReadonlyRootFilesystem and Tmpfs the /tmp in cloud formation as below. 
                              "LinuxParameters" : {
                                  "Tmpfs": [
                                     

      {                                   "ContainerPath": "/tmp",                                   "Size": 2048                                 }

      ,
                                     

      {                                   "ContainerPath": "/run",                                   "Size": 2048                                 }

                                    ]
                              }
      But while running the git operation, the git plugin fails with an error 
      stderr: fatal: cannot exec '/tmp/jenkins-gitclient-pass274502099295752631.sh': Permission denied

      We use a Jenkins instance in a Docker container in version 2.387.1

      I done a online research and didn't found any solution for this
       

          [JENKINS-71453] Git plugin fails with ReadonlyRootFilesystem when tmp is mounted as noexec

          Mark Waite added a comment -

          I don't test the git plugin with a read-only root file system. I assume that the operating system is mounting the /tmp folder as a read/write file system but is choosing to mount with the noexec option as described in JENKINS-50471. A file system that is mounted as noexec does not allow scripts to be executed from that file system even if files can be written to the file system.

          You may be able to resolve the issue by running the Jenkins controller with the property -Djava.io.tmpdir=/some/other/file-system where that value points to a file system that is mounted read/write and allows execution of scripts from the file system.

          Mark Waite added a comment - I don't test the git plugin with a read-only root file system. I assume that the operating system is mounting the /tmp folder as a read/write file system but is choosing to mount with the noexec option as described in JENKINS-50471 . A file system that is mounted as noexec does not allow scripts to be executed from that file system even if files can be written to the file system. You may be able to resolve the issue by running the Jenkins controller with the property -Djava.io.tmpdir=/some/other/file-system where that value points to a file system that is mounted read/write and allows execution of scripts from the file system.

            Unassigned Unassigned
            anishvarghese Anish
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: