On install it already changes from: drwxr-xr-x 2 root root 2 Sep 9 19:47 localhost/ (unpack) to drwxr-xr-x 2 root tomcat8 2 Sep 9 19:47 localhost/ (after postinst and service start)
This is confirmed by doing it without postinst: root@b:~# apt download tomcat8 Get:1 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 tomcat8 all 8.5.39-1ubuntu1~18.04.3 [46.4 kB] Fetched 46.4 kB in 0s (449 kB/s) root@b:~# sudo dpkg --unpack tomcat8_8.5.39-1ubuntu1~18.04.3_all.deb Selecting previously unselected package tomcat8. (Reading database ... 42649 files and directories currently installed.) Preparing to unpack tomcat8_8.5.39-1ubuntu1~18.04.3_all.deb ... Unpacking tomcat8 (8.5.39-1ubuntu1~18.04.3) ... Processing triggers for systemd (237-3ubuntu10.38) ... Processing triggers for ureadahead (0.100.0-21) ... Processing triggers for rsyslog (8.32.0-1ubuntu4) ... root@b:~# sudo mv /var/lib/dpkg/info/tomcat8.postinst /root/tomcat8-manual.postinst root@b:~# sudo dpkg --configure tomcat8 Setting up tomcat8 (8.5.39-1ubuntu1~18.04.3) ... Processing triggers for systemd (237-3ubuntu10.38) ... Processing triggers for ureadahead (0.100.0-21) ... Processing triggers for rsyslog (8.32.0-1ubuntu4) ... root@b:~# ll /var/lib/tomcat8/conf/Catalina/ total 3 drwxr-xr-x 3 root root 3 Feb 27 07:47 ./ drwxr-xr-x 4 root root 11 Feb 27 07:48 ../ drwxr-xr-x 2 root root 2 Sep 9 19:47 localhost/ root@b:~# Lets take apart the rather complex postinst which command will change the ownership -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1820288 Title: Tomcat Web Application Manager does not copy context configuration To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/tomcat8/+bug/1820288/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs