Discover Centmin Mod today
Register Now

Beta Branch fix nginx logrotate su nginx nginx for domain log directories in 140.…

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

  1. eva2000

    eva2000 Administrator Staff Member

    59,476
    12,536
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,176
    Local Time:
    3:10 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    fix nginx logrotate su nginx nginx for domain log directories in 140.00beta01


    Domain log directories at /home/nginx/domains/*/log/ have mode 2770 with
    nginx:nginx ownership. logrotate silently skips these due to its security
    check for group-writable parent directories not owned by root

    Changes:
    - split single logrotate config block into two: root-owned dirs (no su)
    and domain dirs (with su nginx nginx)
    - update logrotate/nginx static template, inc/logrotate_nginx.inc
    funct_logrotate() 4 heredoc variants, and inc/cpcheck.inc fixlogrotate()
    4 heredoc variants with ZSTD detection and JSON log patterns
    - fix fixlogrotate() condition that previously removed su nginx when found
    to instead detect absence of su nginx nginx and add it
    - add fix_nginx_logrotate_domain_su() one-time cleanup function that
    detects servers with domain paths but missing su nginx nginx and triggers
    force-rotation of accumulated domain logs
    - update fix_nginx_logrotate_el9() to also trigger when existing systemd
    drop-in lacks ReadWritePaths for /home/nginx/domains
    - add ReadWritePaths=/home/nginx/domains to EL9/EL10 systemd drop-in for
    logrotate.service to handle ProtectHome=true

    Continue reading...

    140.00beta01 branch