Skip to content

Logrotate Service fails with default npm installation #183

@Wolvan

Description

@Wolvan

Script
nginx-proxy-manager

Describe the bug
Using the script to install nginx proxy manager on a Debian 12 baremetal/VM leads to setting up the logrotate service. The service fails to run because by default both log rotate definitions under /etc/logrotate.d/nginx-proxy-manager require the user npm (su npm npm).
Removing the su npm npm line makes logrotate start normally. The log files are owned by the user root anyways.

System info:

  • Debian Version: 12

Screenshots
image

Additional context
Default nginx-proxy-manager file

/data/logs/*_access.log /data/logs/*/access.log {
    su npm npm
    create 0644
    weekly
    rotate 4
    missingok
    notifempty
    compress
    sharedscripts
    postrotate
    /bin/kill -USR1 `cat /run/nginx.pid 2>/dev/null` 2>/dev/null || true
    endscript
}

/data/logs/*_error.log /data/logs/*/error.log {
    su npm npm
    create 0644
    weekly
    rotate 10
    missingok
    notifempty
    compress
    sharedscripts
    postrotate
    /bin/kill -USR1 `cat /run/nginx.pid 2>/dev/null` 2>/dev/null || true
    endscript
}

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions