Skip to content

Commit 4335bd4

Browse files
committed
[FIXED JENKINS-12231] ensure right owner
1 parent a6495c0 commit 4335bd4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

rpm/SPECS/jenkins.spec

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,10 @@ if test -d /var/run/hudson; then
110110
rmdir /var/run/hudson
111111
fi
112112

113+
# Ensure the right ownership on files
114+
. /etc/sysconfig/jenkins
115+
chown -R ${JENKINS_USER:-jenkins} /var/log/jenkins
116+
chown -R ${JENKINS_USER:-jenkins} ${JENKINS_HOME:-%{workdir}}
113117

114118
%preun
115119
if [ "$1" = 0 ] ; then

0 commit comments

Comments
 (0)