Want more timely Centmin Mod News Updates?
Become a Member

Stable Branch fix nginx logrotate create directive for domain su rotation in 132.00…

Discussion in 'Centmin Mod Github Commits' started by eva2000, May 31, 2026.

  1. eva2000

    eva2000 Administrator Staff Member

    59,488
    12,536
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,176
    Local Time:
    6:33 AM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    fix nginx logrotate create directive for domain su rotation in 132.00stable

    Domain log block runs as 'su nginx nginx' but had no 'create' directive, so logrotate recreated rotated logs with the original root:nginx owner and failed with EPERM (cannot chown to uid 0) when run as nginx, breaking logrotate.service. Add 'create 0644 nginx nginx' so new domain logs are owned nginx:nginx. Also self-heal existing installs whose file already has su+maxsize (the old fixlogrotate guard never fired for them).

    Changes:
    - inc/logrotate_nginx.inc: add 'create 0644 nginx nginx' to all 4 domain-block heredoc variants
    - inc/cpcheck.inc: same in all 4 fixlogrotate() rewrite variants
    - inc/cpcheck.inc: add fix_nginx_logrotate_domain_create() detector (mode-tolerant regex preserves manual create 0640 edits)
    - inc/cpcheck.inc: extend fixlogrotate() guard to rewrite when domain block lacks a create directive, plus one-time logrotate -f
    - inc/cpcheck.inc: wire detector in cpcheck() before fixlogrotate
    - logrotate/nginx: patch dormant static template for consistency


    Continue reading...

    132.00stable branch