You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "StudentGu (via GitHub)" <gi...@apache.org> on 2024/08/28 03:56:52 UTC

[I] Set permissions for rollover file (logging-log4j2)

StudentGu opened a new issue, #2894:
URL: https://github.com/apache/logging-log4j2/issues/2894

   **Warning!**
   It is highly recommended to discuss feature requests in [the mailing lists](https://logging.apache.org/log4j/2.x/support.html) first.
   
   [A clear and concise description of the feature requested.]
   When a log rollover, I can not update the permissions, it inherited the permissions of the original file


-- 
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: notifications-unsubscribe@logging.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Set permissions for rollover file (logging-log4j2)

Posted by "ppkarwasz (via GitHub)" <gi...@apache.org>.
ppkarwasz closed issue #2894: Set permissions for rollover file
URL: https://github.com/apache/logging-log4j2/issues/2894


-- 
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: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Set permissions for rollover file (logging-log4j2)

Posted by "StudentGu (via GitHub)" <gi...@apache.org>.
StudentGu commented on issue #2894:
URL: https://github.com/apache/logging-log4j2/issues/2894#issuecomment-2316877010

   **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=&quot;%t&quot; %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: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Set permissions for rollover file (logging-log4j2)

Posted by "ppkarwasz (via GitHub)" <gi...@apache.org>.
ppkarwasz commented on issue #2894:
URL: https://github.com/apache/logging-log4j2/issues/2894#issuecomment-2314462973

   @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.)?


-- 
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: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Set permissions for rollover file (logging-log4j2)

Posted by "StudentGu (via GitHub)" <gi...@apache.org>.
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=&quot;%t&quot; %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: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org