StudentGu commented on issue #2894:
URL:
https://github.com/apache/logging-log4j2/issues/2894#issuecomment-2316879609
> @StudentGu,
>
> > When a log rollover, I can not update the permissions, it inherited the
permissions of the original file
>
> Can you give us the:
>
> * configuration of your rolling file appender,
> * the OS you are using,
> * the user that is running the Java application (is it a privileged user,
is it the owner of the log file, etc.)?
@ppkarwasz
**Yes, please see the answer below:**
- configuration
```xml
<RollingFile name="task_sync"
fileName="${sys:catalina.base}/apphome/log/task.log">
<PatternLayout>
<Pattern>TASK INFORMATION | %mm | THREAD="%t" %n</Pattern>
</PatternLayout>
</RollingFile>
<Async name="vsc_task_run_file">
<AppenderRef ref="task_sync"/>
<NoteCategoryFilter category="SCHEDULE"/>
</Async>
```
- OS
```txt
Linux kwephis12504946 4.12.14-120-default #1 SMP Thu Nov 7 16:39:09 UTC
2019 (fd9dc36) x86_64 x86_64 x86_64 GNU/Linux
```
- the current file is task.log with the permissions "-rw-r-----",
and when task.log is rolled to task_xxxx.log, it permissions still is
"-rw-r-----", which i want it permissions is "-r--r-----"
**So, how can i configure the rolled file permissions to be different from
the current file**
**If it is not currently supported, can I add this feature to the project?**
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]