mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-25 09:25:55 +03:00
[PR #3219] [MERGED] Make logrotate use the proper user and group. #3670
Labels
No labels
awaiting feedback
bug
cannot reproduce
dns provider request
duplicate
enhancement
enhancement
enhancement
good first issue
help wanted
invalid
need more info
no certbot plugin available
product-support
pull-request
question
stale
troll
upstream issue
v2
v2
v2
v3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-proxy-manager-NginxProxyManager#3670
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/NginxProxyManager/nginx-proxy-manager/pull/3219
Author: @FibreTTP
Created: 9/27/2023
Status: ✅ Merged
Merged: 10/3/2023
Merged by: @jc21
Base:
develop← Head:logrotate-perms📝 Commits (3)
6b565e6Change perms on logrotated logs to npm user4867db0Remove explicit user and group - add su directive for default user (npm).f426e64Add warning comment about changing the default user name and group name📊 Changes
2 files changed (+8 additions, -2 deletions)
View changed files
📝
docker/rootfs/bin/common.sh(+4 -0)📝
docker/rootfs/etc/logrotate.d/nginx-proxy-manager(+4 -2)📄 Description
Fixes https://github.com/NginxProxyManager/nginx-proxy-manager/issues/2938.
As seen in that issue, users are seeing an error when logrotate tries to own log files as root:
where /data/logs/<anything> is the log failing to be owned. This causes logrotate to never be able to compress and delete logs.
Since the logrotate configuration was made before (the better) user and group configuration was implemented earlier this year, it was written to own the files as root.
This pull makes logrotate create the logs as whoever owned them beforehand by removing the explicit root user and group in the
createdirective. It also makes logrotate perform all actions as npm:npm, to ensure it doesn't regress https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1250.It will also work when running as root, as when a PUID and PGID is not set, the npm:npm user/group will have the uid/gid of 0.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.