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

https://github.com/jenkinsci/jenkins/pull/1397/commits which over-rides system default umask of 022 to 027 causes problems with folder creation in jobs in release 1.582

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • _unsorted
    • None

      I just wanted to point out a problem I encounted, and double check if anyone else had similar issues recently.

      I frequently build build vm's installing and setting up Jenkins and yesterday came across an issue where some of my jobs then started failing on a new Jenkins setup due to file/folder permissions.

      It seemed to mkdir -p commands were setting folders to 750 rather than 755 so some commands run as sudo would make folders as root normally at 755 as 750 then the Jenkins user would not be able to access them. Normally this was never a problem.

      Testing on the command line everything appeared fine on the server and umask was set to 022 in /etc/login.defs

      Changing to become Jenkins user from root and creating directories showed nothing to be wrong... folders 755 and files 664

      Anyway I noticed this...

      https://github.com/jenkinsci/jenkins/pull/1397/commits

      So the umask value in /etc/defaults/jenkins was being ignored and now is being picked up... so now it is 027

      I was just wondering maybe this has broken builds for other people where folders get created as root, or one process happens as root and then the jenkins user tries to read the folder or file?

      root@server:# cd /tmp/
      root@server:/tmp# mkdir testfolder
      root@server:/tmp# chmod 750 testfolder/
      root@server:/tmp# su jenkins
      jenkins@server:/tmp$ cd testfolder/
      bash: cd: testfolder/: Permission denied
      jenkins@server:/tmp$ touch testfolder/testfile
      touch: cannot touch `testfolder/testfile': Permission denied

      Why the need for this umask 027 default?

      I am sedding it out of the /etc/default/jenkins when I create my vm and using the system default.

          [JENKINS-25065] https://github.com/jenkinsci/jenkins/pull/1397/commits which over-rides system default umask of 022 to 027 causes problems with folder creation in jobs in release 1.582

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          changelog.html
          debian/debian/jenkins.default
          http://jenkins-ci.org/commit/jenkins/9c96f3dcca1784094f28ccd6df6abed1d229a1d4
          Log:
          [FIXED JENKINS-25065 JENKINS-24987]

          Based on the reaction to these issues and JENKINS-24514, I'm partially
          reverting the original change, and bringing the umask default back to
          022.

          The configurable option does enable the user to choose a different
          umask, so I think I can still claim that JENKINS-24514 is addressed.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: changelog.html debian/debian/jenkins.default http://jenkins-ci.org/commit/jenkins/9c96f3dcca1784094f28ccd6df6abed1d229a1d4 Log: [FIXED JENKINS-25065 JENKINS-24987] Based on the reaction to these issues and JENKINS-24514 , I'm partially reverting the original change, and bringing the umask default back to 022. The configurable option does enable the user to choose a different umask, so I think I can still claim that JENKINS-24514 is addressed.

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          debian/jenkins.default
          http://jenkins-ci.org/commit/packaging/9e97bed31ebd389bbca6889f8328c0b5725f26fc
          Log:
          [FIXED JENKINS-25065 JENKINS-24987]

          Based on the reaction to these issues and JENKINS-24514, I'm partially
          reverting the original change, and bringing the umask default back to
          022.

          The configurable option does enable the user to choose a different
          umask, so I think I can still claim that JENKINS-24514 is addressed.

          Originally-From: jenkins-ci.org/commit/core/9c96f3dcca1784094f28ccd6df6abed1d229a1d4

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: debian/jenkins.default http://jenkins-ci.org/commit/packaging/9e97bed31ebd389bbca6889f8328c0b5725f26fc Log: [FIXED JENKINS-25065 JENKINS-24987] Based on the reaction to these issues and JENKINS-24514 , I'm partially reverting the original change, and bringing the umask default back to 022. The configurable option does enable the user to choose a different umask, so I think I can still claim that JENKINS-24514 is addressed. Originally-From: jenkins-ci.org/commit/core/9c96f3dcca1784094f28ccd6df6abed1d229a1d4

            kohsuke Kohsuke Kawaguchi
            duncan Duncan Bell
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: