Re: [webmin-l] Very odd logrotate incident
"Jamie Cameron" <[email protected]>
| Newsgroups | gmane.comp.web.webmin.general |
|---|---|
| Message-ID | <[email protected]> |
When you add a new domain, Virtualmin will add it's logs to an existing logrotate block if it looks like it is used for other domains. This is done so that the post-rotation command only gets run once. However, this shouldn't cause existing domain's logs to get added to the block, unless you disabled and re-enabled logrotate for all those domains. - Jamie On 04/Feb/2019 03:37 Joaquim Homrighausen <[email protected]> wrote .. > > I can't quite put my finger on this one, but I noticed something really strange. > I'm guessing it's related to Virtualmin (GPL), but I don't know that. > > A number of sites had been transferred to this server using Virtualmin/Webmin, > all good. Because of issues with PHP-FPM and what not, I manually corrected the > Apache configuration file(s) as well as setting up proper PHP-FPM pools, etc. They're > all more or less identical, apart from the directory names, domain names, proxy > port, etc. > > So there was a big logrotate block for all of these servers. It looked good. > > At some point, I created a "manual" logrotate block for one site's PHP log file. > It was getting ridiculously large due to moving from PHP 5.x to PHP 7.2 and that > site not using updated plugins, etc. For this specific file, I set-up a defined > owner:group for the new files in the logrotate configuration. > > Some days later, PHP-FPM and/or Apache crashed when logrotate was invoked. I couldn't > quite figure out what had happened other than that it was related to the log rotation > somehow. After having spent some time searching various log files, checking permissions, > etc. I saw that the "manual" logrotate block that I had created for that one site's > PHP log now contained other sites as well, and this time, Apache logs too. Given > that I had set up that job to create the new files with a specific ownership, all > of the (new) files in that logrotate block got the wrong owner:group. > > I manually went through those sites and corrected the ownership, restarted both > Apache and PHP-FPM and everything started working again. I then moved those sites > from the wrong logrotate block to the right one. > > I *think* those sites, that appeared in the wrong logrotate block, were sites I > had created "fresh" on that server. I have no clue as to why their logrotate configuration > ended up in the wrong place, but they did. > > Does that make any sense at all? :) > > > -joho - Forwarded by the Webmin mailing list at [email protected] To remove yourself from this list, go to http://lists.sourceforge.net/lists/listinfo/webadmin-list