logrotate cron job not rotating certain logs

后端 未结 6 976
生来不讨喜
生来不讨喜 2021-02-05 14:01

I added two scripts in \"logrotate.d\" directory for my application logs to be rotated. This is the config for one of them:

 {
  compress
           


        
6条回答
  •  北恋
    北恋 (楼主)
    2021-02-05 14:49

    SELinux is preventing /usr/sbin/logrotate from read access on the directory sites.

    ***** Plugin catchall (100. confidence) suggests ***************************

    If you believe that logrotate should be allowed read access on the sites directory by default. Then you should report this as a bug. You can generate a local policy module to allow this access.
    Do
    allow this access for now by executing:

    # grep logrotate /var/log/audit/audit.log | audit2allow -M mypol
    # semodule -i mypol.pp
    

提交回复
热议问题