도커로 nginx 열었는데


/etc/logrotate.d/nginx는 이렇게 작성함


/var/log/nginx/*.log {

    daily

    dateext

    missingok

    rotate 30

    compress

    delaycompress

    notifempty

    create 640 root root

    sharedscripts

    prerotate

    postrotate

        if [ -f /var/run/nginx.pid ]; then

            kill -USR1 `cat /var/run/nginx.pid`

        fi

    endscript

}


근데 logrotate -d -f /etc/logrotate.d/nginx 해보니깐


WARNING: logrotate in debug mode does nothing except printing debug messages!  Consider using verbose mode (-v) instead if this is not what you want.


Potentially dangerous mode on /etc/logrotate.d/nginx: 0664

error: Ignoring /etc/logrotate.d/nginx because it is writable by group or others.

Reading state from file: /var/lib/logrotate/status

Allocating hash table for state file, size 64 entries


Handling 0 logs

이렇게 나옴


logrotate -f /etc/logrotate.d/nginx 하면


error: Ignoring /etc/logrotate.d/nginx because it is writable by group or others.

이렇게 에러 나옴


뭐가 문제일까