Submitted by aitte on Tue, 02/19/2013 - 09:43
when renaming example.com to example2.com, and looking in /var/log/virtualmin/ you will see the following:
-rw-r--r-- 1 root root 0 Feb 19 10:23 example2.com_access_log
-rw-r--r-- 1 root root 0 Feb 19 10:23 example2.com_error_log
-rw-rw---- 1 example nginx 0 Feb 19 10:18 example.com_access_log
-rw-rw---- 1 example nginx 0 Feb 19 10:18 example.com_error_log
problems: old log is kept. new log has wrong owner/group/permissions.
i don't think there are problems in other places. i did a "ls -alR /home/example/" and all files have the proper owner there. seems it's just this one per-site log file that's affected.
Status:
Closed (fixed)
Comments
Submitted by JamieCameron on Tue, 02/19/2013 - 13:54 Comment #1
That seems like a bug. I assume you were using Nginx as your webserver in this case?
Submitted by aitte on Tue, 02/19/2013 - 18:51 Comment #2
yes nginx enabled, apache disabled.
i suspect it may be because nginx runs as root, and the server rename process works by editing the nginx server config which tells it to output to a new log location, which doesn't exist yet, and thus it's created by nginx as root:root.
i guess rename could take care to pre-create a 0 byte log owned by the proper user/group combo before telling nginx to re-read its config.
Submitted by JamieCameron on Tue, 02/19/2013 - 19:17 Comment #3
Ok, I see the bug here - it will be fixed in the next Nginx plugin release.
Submitted by Issues on Tue, 03/05/2013 - 19:18 Comment #4
Automatically closed -- issue fixed for 2 weeks with no activity.