error: skipping "/logs/traefik/access.log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.
Any help greatly appreciated.
Mo
*********************
* TRAEFIK LOGROTATE *
*********************
GIT_REPO: https://github.com/vegardit/docker-traefik-logrotate
GIT_BRANCH: main
GIT_COMMIT: 45ab8ef @ 2022-03-25 14:53:41 UTC
IMAGE_BUILD: 2022-05-09T01:52:20Z
2022-05-09 18:13:21 INFO [/opt/run.sh:26] Timezone is UTC +0000
2022-05-09 18:13:21 INFO [/opt/run.sh:48] Generating [/etc/logrotate.conf] based on template [/opt/logrotate.conf.template]...
/logs/traefik/access.log {
�
y
maxsize 50M
rotate 14
start 1
missingok
notifempty
�
compress
delaycompress
create 0644 root root
sharedscripts
postrotate
/opt/notify-traefik.sh
endscript
}
2022-05-09 18:13:21 INFO [/opt/run.sh:61] Scheduling logrotate cronjob...
2022-05-09 18:13:21 INFO [/opt/run.sh:64] Starting cron daemon...
2022-05-09 18:14:00 INFO [/opt/rotate-logs.sh:16] ########## logrotate START ##########
reading config file /etc/logrotate.conf
Creating stub state file: /var/lib/logrotate.status
Reading state from file: /var/lib/logrotate.status
Allocating hash table for state file, size 64 entries
Handling 1 logs
rotating pattern: /logs/traefik/access.log after 1 days (14 rotations)
empty log files are not rotated, log files >= 52428800 are rotated earlier, old logs are removed
considering log /logs/traefik/access.log
error: skipping "/logs/traefik/access.log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.
Creating new state
18:14:00 Error - exited with status 1 in [/opt/rotate-logs.sh] at line 18:
15 #################################################
16 log INFO "########## logrotate START ##########"
17
18 /usr/sbin/logrotate --verbose /etc/logrotate.conf 2> >(sed 's/^/ /' >&2)
19
20 log INFO "########## logrotate END ############"
2022-05-09 18:15:00 INFO [/opt/rotate-logs.sh:16] ########## logrotate START ##########
reading config file /etc/logrotate.conf
Reading state from file: /var/lib/logrotate.status
Allocating hash table for state file, size 64 entries
Creating new state
Handling 1 logs
rotating pattern: /logs/traefik/access.log after 1 days (14 rotations)
empty log files are not rotated, log files >= 52428800 are rotated earlier, old logs are removed
considering log /logs/traefik/access.log
error: skipping "/logs/traefik/access.log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.
18:15:00 Error - exited with status 1 in [/opt/rotate-logs.sh] at line 18:
15 #################################################
16 log INFO "########## logrotate START ##########"
17
18 /usr/sbin/logrotate --verbose /etc/logrotate.conf 2> >(sed 's/^/ /' >&2)
19
20 log INFO "########## logrotate END ############"