FS#61037 - [nginx] nginx log file created with different mode and user, group after logrotate

Attached to Project: Arch Linux
Opened by idealities (ideal) - Wednesday, 12 December 2018, 03:04 GMT
Last edited by Massimiliano Torromeo (mtorromeo) - Saturday, 16 September 2023, 09:27 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Massimiliano Torromeo (mtorromeo)
Levente Polyak (anthraxx)
Giancarlo Razzolini (grazzolini)
T.J. Townsend (blakkheim)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

Due to 'create 640 http log' in logrotate file (https://git.archlinux.org/svntogit/packages.git/tree/trunk/logrotate?h=packages/nginx ), after logrotate, the log files will be created as 0640, with user http and group log. However this is not same as log files created by nginx first.

Additional info:
* package version(s)

nginx

* config and/or log files etc.


Steps to reproduce:

Install nginx, benchmark it to produce some access logs, and run logrotate /etc/logrotate.conf manually.
This task depends upon

Closed by  Massimiliano Torromeo (mtorromeo)
Saturday, 16 September 2023, 09:27 GMT
Reason for closing:  Fixed
Additional comments about closing:  nginx-1.24.0-2
Comment by Buggy McBugFace (bugbot) - Tuesday, 08 August 2023, 19:11 GMT
This is an automated comment as this bug is open for more then 2 years. Please reply if you still experience this bug otherwise this issue will be closed after 1 month.
Comment by Massimiliano Torromeo (mtorromeo) - Saturday, 16 September 2023, 09:27 GMT
The owner of new log files created by nginx is supposed to be "http" but they are not chown-ed correctly due to a possible bug in nginx. Executing "nginx -s reopen" changes their owner to the one configured in nginx.conf [1].

The "log" group is not consistent, so I changed it to root in logrotate.

[1]: https://superuser.com/questions/1549120/nginx-creates-log-files-owned-by-root-instead-of-specified-user/1591135#1591135

Loading...