[webmin-l] Very odd logrotate incident

Joaquim Homrighausen <[email protected]>
Newsgroups gmane.comp.web.webmin.general
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.