I have problem with file permissions with RollingFile and log4j2 configuration. Application is creating log file as follows:
-rwxr-xr-x. 1 centos centos 10379932 Feb  8 13:55 application.log
after rolling files read permissions for others are missing. I'm not using any permissions setting with log4j
-rw-r-----. 1 root   root        524 Feb  9 13:42 application.log
-rw-r-----. 1 root   root     462705 Feb  9 10:24 application.log.1.gz
umask is: 0022
my log4j2.xml
        <RollingFile name="test_app" fileName="${sys:application.home}/logs/application.log" ignoreExceptions="false" filePattern="${sys:application.home}/logs/application.log.%i.gz">
            <PatternLayout pattern="%d{dd-MMM-yyyy HH:mm:ss,SSS} - %X{userId} - %X{sessionId} %-5p %c{1}:%L - %m%n"/>
            <Policies>
                <SizeBasedTriggeringPolicy size="10MB"/>
            </Policies>
            <DefaultRolloverStrategy max="50"/>
        </RollingFile>
I have 2 environments and on the second one permissions are as expected (application and log4j2 configuration is the same) Where can I search the problem?