I just upgraded from 1.342 to 1.343 and found a build failing afterwards which launched Xvnc.
After investigation I found out that the permission of the file /var/lib/hudson/.vnc/passwd has been changed causing Xvnc fail to start.
The permissions should be 600 but they were 750 after upgrading.
Besides the permissions and ownerships of the installed tools (different JDK and Maven versions) were also touched unneccessarily.
Since /var/lib/hudson is the home directory of the user 'hudson' there are many files and directories created which belong to the tools which are started as part of the build.
IMHO the Debian Package shouldn't mess with the ownerships and permissions of files/directories which are not part of the hudson package at all.
As I see it, the following lines from version 1.343 of the postinst script perform recursive operations:
find /var/lib/hudson -path "jobs" -prune -o -path ".ssh" -prune -o -exec chmod 750 {} +
chown -R hudson:adm /var/run/hudson /var/log/hudson
find /var/lib/hudson -path "*jobs" -prune -o -exec chown hudson:adm {} +
chmod -R 750 /var/run/hudson
No matter which directories or files are excluded (see jobs and .ssh for examples above), there will always be some more which are missing ...
I'd suggest to take an alternative approach.
What's the root cause to fix the permissions all the time anyway?
Therefore I'm reopening the issue ...
Code changed in hudson
User: : kohsuke
Path:
trunk/www/changelog.html
http://fisheye4.cenqua.com/changelog/hudson/?cs=19872
Log:
[FIXED JENKINS-4047] Fixed the permission to 750. I believe go-w is all ssh needs for ancestor directoreis.