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

Debian package upgrade sets wrong user permissions if HUDSON_USER is not hudson (default)

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Environment:
      Linux 2.6.31-19-server #56-Ubuntu SMP Thu Jan 28 03:40:48 UTC 2010 x86_64 GNU/Linux
    • Similar Issues:
      Show 5 results

      Description

      We have a setup where the user is not hudson (default) but build:

      Extract from /etc/default/hudson

      # user id to be invoked as (otherwise will run as root; not wise!) 
      HUDSON_USER=build
      

      After hudson package upgrade (aptitude) I noticed that the permission in the following directory is set to hudson:adm again instead of $

      {HUDSON_USER}

      :

      /var/lib/hudson <- hudson configuration
      /var/run/hudson/war <- web root

      This causes hudson to not run properly.
      The user permissions should be changed to the user specified in HUDSON_USER.

      Possible fix in /trunk/hudson/main/debian/hudson.postinst:

      • Read HUDSON_USER from /etc/default/hudson or maybe hudson.default and set the permission accordingly

      I'm not sure how to handle the group permission. It could be fixed to adm (current solution) or a new environment variable HUDSON_GROUP could be added.

      A completely different approach could be to don't touch permission after upgrade at all.

      A recent change in this area (JENKINS-4047) leaves the jobs directory untouched. But this doesn't fix the current problem.

        Attachments

          Issue Links

            Activity

            andisch andisch created issue -
            rdesgroppes RĂ©gis Desgroppes made changes -
            Field Original Value New Value
            Link This issue is related to JENKINS-7575 [ JENKINS-7575 ]
            kohsuke Kohsuke Kawaguchi made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            kohsuke Kohsuke Kawaguchi made changes -
            Status In Progress [ 3 ] Open [ 1 ]
            Hide
            kohsuke Kohsuke Kawaguchi added a comment -

            I'm curious how other debian packages handle this kind of problem.
            A relatively easy workaround is not to use /var/lib/hudson if you are using a different user.

            I'm tempted to mark this issue as "Won't Fix", but if there's any debian expert, I'd love to hear your opinion.

            Show
            kohsuke Kohsuke Kawaguchi added a comment - I'm curious how other debian packages handle this kind of problem. A relatively easy workaround is not to use /var/lib/hudson if you are using a different user. I'm tempted to mark this issue as "Won't Fix", but if there's any debian expert, I'd love to hear your opinion.
            Hide
            blueyed Daniel Hahler added a comment -

            I've created a pull request, which should fix this (for JENKINS_USER - it does not add a new variable JENKINS_GROUP):
            https://github.com/jenkinsci/jenkins/pull/308

            Show
            blueyed Daniel Hahler added a comment - I've created a pull request, which should fix this (for JENKINS_USER - it does not add a new variable JENKINS_GROUP): https://github.com/jenkinsci/jenkins/pull/308
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Daniel Hahler
            Path:
            changelog.html
            debian/debian/jenkins.postinst
            http://jenkins-ci.org/commit/jenkins/8d1cda0edd31764f613f1ab100205c9d9a7faac9
            Log:
            JENKINS-5771 Use $JENKINS_USER in Debian postinst.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Hahler Path: changelog.html debian/debian/jenkins.postinst http://jenkins-ci.org/commit/jenkins/8d1cda0edd31764f613f1ab100205c9d9a7faac9 Log: JENKINS-5771 Use $JENKINS_USER in Debian postinst.
            Hide
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #1332
            JENKINS-5771 Use $JENKINS_USER in Debian postinst.

            Kohsuke Kawaguchi : 8d1cda0edd31764f613f1ab100205c9d9a7faac9
            Files :

            • debian/debian/jenkins.postinst
            • changelog.html
            Show
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #1332 JENKINS-5771 Use $JENKINS_USER in Debian postinst. Kohsuke Kawaguchi : 8d1cda0edd31764f613f1ab100205c9d9a7faac9 Files : debian/debian/jenkins.postinst changelog.html
            Hide
            kohsuke Kohsuke Kawaguchi added a comment -

            The above commit fixes this problem.

            Show
            kohsuke Kohsuke Kawaguchi added a comment - The above commit fixes this problem.
            kohsuke Kohsuke Kawaguchi made changes -
            Status Open [ 1 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Daniel Hahler
            Path:
            debian/jenkins.postinst
            http://jenkins-ci.org/commit/packaging/cdb977643ff21c0840608cbeea1bb252cbb14ee1
            Log:
            JENKINS-5771 Use $JENKINS_USER in Debian postinst.

            Originally-From: jenkins-ci.org/commit/core/8d1cda0edd31764f613f1ab100205c9d9a7faac9

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Hahler Path: debian/jenkins.postinst http://jenkins-ci.org/commit/packaging/cdb977643ff21c0840608cbeea1bb252cbb14ee1 Log: JENKINS-5771 Use $JENKINS_USER in Debian postinst. Originally-From: jenkins-ci.org/commit/core/8d1cda0edd31764f613f1ab100205c9d9a7faac9

              People

              • Assignee:
                Unassigned
                Reporter:
                andisch andisch
              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: