Before the upgrade, the permissions and ownership of the directories matched those specified in the statoverrides.
The postinst scripts for tomcat6_6.0.18-0ubuntu3.3_all.deb and tomcat6_6.0.24-2ubuntu1_all.deb both contain chowns and chmods like the following (from 6.0.18):
I've just added the following stat overrides on a system that had not yet upgraded to the latest tomcat6 package:
dpkg-statoverride --add cms cms 750 /var/log/tomcat6/ tomcat6/ temp/ Catalina Catalina/ localhost tomcat6/ webapps
dpkg-statoverride --add cms cms 755 /var/lib/
dpkg-statoverride --add cms cms 750 /var/cache/tomcat6
dpkg-statoverride --add root cms 775 /etc/tomcat6/
dpkg-statoverride --add root cms 775 /etc/tomcat6/
dpkg-statoverride --add root cms 775 /var/lib/
I then ran a dist-upgrade. After the upgrade, the directories listed above had all had their user and or group changed as follows:
root@host: /var/lib/ tomcat6# ls -ld /var/log/tomcat6/ /var/lib/ tomcat6# ls -ld /var/lib/ tomcat6/ temp/ tomcat6/ temp/ /var/lib/ tomcat6# ls -ld /var/cache/tomcat6 /var/lib/ tomcat6# ls -ld /etc/tomcat6/ Catalina Catalina /var/lib/ tomcat6# ls -ld /etc/tomcat6/ Catalina/ localhost Catalina/ localhost /var/lib/ tomcat6# ls -ld /var/lib/ tomcat6/ webapps tomcat6/ webapps
drwxr-x--- 2 tomcat6 adm 4096 2010-04-08 09:47 /var/log/tomcat6/
root@host:
drwxr-xr-x 2 tomcat6 cms 4096 2009-12-21 15:11 /var/lib/
root@host:
drwxr-x--- 2 tomcat6 adm 4096 2010-04-08 10:37 /var/cache/tomcat6
root@host:
drwxrwxr-x 3 root tomcat6 4096 2009-10-12 09:27 /etc/tomcat6/
root@host:
drwxrwxr-x 2 root tomcat6 4096 2010-04-08 10:37 /etc/tomcat6/
root@host:
drwxrwxr-x 4 root tomcat6 4096 2009-12-18 09:36 /var/lib/
Before the upgrade, the permissions and ownership of the directories matched those specified in the statoverrides.
The postinst scripts for tomcat6_ 6.0.18- 0ubuntu3. 3_all.deb and tomcat6_ 6.0.24- 2ubuntu1_ all.deb both contain chowns and chmods like the following (from 6.0.18):
chown -R tomcat6:adm /var/log/tomcat6 /var/cache/tomcat6 tomcat- users.xml tomcat- users.xml tomcat6/ temp tomcat6/ webapps tomcat6/ webapps Catalina /etc/tomcat6/ Catalina/ localhost Catalina /etc/tomcat6/ Catalina/ localhost
chmod 750 /var/log/tomcat6 /var/cache/tomcat6
chgrp tomcat6 /etc/tomcat6/
chmod 640 /etc/tomcat6/
chown tomcat6 /var/lib/
chgrp tomcat6 /var/lib/
chmod 775 /var/lib/
chgrp tomcat6 /etc/tomcat6/
chmod 775 /etc/tomcat6/
I don't know much about dpkg, but these certainly seem to be hardcoded to the tomcat6 and adm groups.