Bug#987179: tomcat9: catalina.out created with root owner, then logrotate fails to process it
Markus Koschany
apo at debian.org
Fri Sep 24 13:35:38 BST 2021
On Mon, 19 Apr 2021 10:13:50 +0200 Adam Cecile <acecile at le-vert.net> wrote:
> Package: tomcat9
> Version: 9.0.43-1
> Severity: important
>
> Hello,
>
> I just deployed 9 servers using Debian 11 and I have a rather serious issue
> with them.
>
> root at debian11.server:~# ls -lah /var/log/tomcat9/catalina.out
> -rw-r----- 1 root adm 2.8G Apr 19 10:05 /var/log/tomcat9/catalina.out
>
> root at debian10.server:~# ls -lah /var/log/tomcat9/catalina.out
> -rw-r----- 1 tomcat adm 1.3M Apr 19 10:05 /var/log/tomcat9/catalina.out
>
> As you can see, owner is incorrect.
Thanks for the report. I have changed the rsyslogd configuration for tomcat9 to
set the fileOwner explicitly instead of using the default configuration.
Before: rsyslog.d/tomcat9.conf
:programname, startswith, "tomcat9" {
/var/log/tomcat9/catalina.out;TomcatFormat
stop
}
Now:
:programname, startswith, "tomcat9" {
action(type="omfile" file="/var/log/tomcat9/catalina.out"
Template="TomcatFormat" fileOwner="tomcat" fileCreateMode="0640")
stop
}
This will only take effect when tomcat9 is installed for the first time or re-
installed though.
Regards,
Markus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 963 bytes
Desc: This is a digitally signed message part
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-maintainers/attachments/20210924/9ddc0859/attachment.sig>
More information about the pkg-java-maintainers
mailing list