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

RPM upgrade does not honor JENKINS_USER, and always resets files ownership to "jenkins"

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None
    • Linux, CentOS and Fedora. Using RPM installation and upgrade

      I have a Jenkins installation for which I changed the "JENKINS_USER" and "JENKINS_HOME" (in /etc/sysconfig/jenkins) from the defaults.
      When I do an upgrade via yum/RPM, it sets the ownership of /var/log/jenkins back to default user "jenkins" (instead of honoring my JENKINS_USER configuration).

      This prevents Jenkins from starting after an upgrade. And since it cannot write to the log file, it may not be easy to figure out what went wrong.

          [JENKINS-12231] RPM upgrade does not honor JENKINS_USER, and always resets files ownership to "jenkins"

          Fernando Dobladez created issue -

          Simple patch that solves the problem. Not ideal, since the %files section is also setting the ownership (hardcoded to 'jenkins'), but works for me.

          Fernando Dobladez added a comment - Simple patch that solves the problem. Not ideal, since the %files section is also setting the ownership (hardcoded to 'jenkins'), but works for me.
          Fernando Dobladez made changes -
          Fernando Dobladez made changes -
          Description Original: I have a Jenkins installation for which I changed the "JENKINS_USER" and "JENKINS_HOME" (in /etc/sysconfig/jenkins) from the defaults.
          When I do an upgrade via yum/RPM, it sets the ownership of /var/log/jenkins back to default user "jenkins" (instead of honoring my JENKINS_USER configuration.
          New: I have a Jenkins installation for which I changed the "JENKINS_USER" and "JENKINS_HOME" (in /etc/sysconfig/jenkins) from the defaults.
          When I do an upgrade via yum/RPM, it sets the ownership of /var/log/jenkins back to default user "jenkins" (instead of honoring my JENKINS_USER configuration).

          This prevents Jenkins from starting after an upgrade. And since it cannot write to the log file, it may not be easy to figure out what went wrong.
          Priority Original: Minor [ 4 ] New: Major [ 3 ]

          Georg Sash added a comment -

          I have the exact same problem. this is very annoying.

          Georg Sash added a comment - I have the exact same problem. this is very annoying.

          evernat added a comment -

          In order to be fixed, it would be better to submit a pull request at github than just a patch here.

          I suppose that the pull request would be for this file:
          https://github.com/jenkinsci/jenkins/blob/master/rpm/SPECS/jenkins.spec

          evernat added a comment - In order to be fixed, it would be better to submit a pull request at github than just a patch here. I suppose that the pull request would be for this file: https://github.com/jenkinsci/jenkins/blob/master/rpm/SPECS/jenkins.spec

          Code changed in jenkins
          User: Nicolas De loof
          Path:
          rpm/SPECS/jenkins.spec
          http://jenkins-ci.org/commit/jenkins/4335bd435f9e5258831c5631bfab2fd837fd7719
          Log:
          [FIXED JENKINS-12231] ensure right owner

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nicolas De loof Path: rpm/SPECS/jenkins.spec http://jenkins-ci.org/commit/jenkins/4335bd435f9e5258831c5631bfab2fd837fd7719 Log: [FIXED JENKINS-12231] ensure right owner
          SCM/JIRA link daemon made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

          dogfood added a comment -

          Integrated in jenkins_main_trunk #3174
          [FIXED JENKINS-12231] ensure right owner (Revision 4335bd435f9e5258831c5631bfab2fd837fd7719)

          Result = SUCCESS
          Nicolas De Loof : 4335bd435f9e5258831c5631bfab2fd837fd7719
          Files :

          • rpm/SPECS/jenkins.spec

          dogfood added a comment - Integrated in jenkins_main_trunk #3174 [FIXED JENKINS-12231] ensure right owner (Revision 4335bd435f9e5258831c5631bfab2fd837fd7719) Result = SUCCESS Nicolas De Loof : 4335bd435f9e5258831c5631bfab2fd837fd7719 Files : rpm/SPECS/jenkins.spec

          This solution is really bad for me and for anyone with a very big jenkins installation, as the chown is taking around 1hr for each jenkins upgrade.

          Maybe the script could skip the chown if there is a specific sysconfig variable set? (SKIP_CHOWN?)

          Francisco Lozano added a comment - This solution is really bad for me and for anyone with a very big jenkins installation, as the chown is taking around 1hr for each jenkins upgrade. Maybe the script could skip the chown if there is a specific sysconfig variable set? (SKIP_CHOWN?)
          Francisco Lozano made changes -
          Resolution Original: Fixed [ 1 ]
          Status Original: Resolved [ 5 ] New: Reopened [ 4 ]

            Unassigned Unassigned
            fernando Fernando Dobladez
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: