Problems with apache logs for virtual servers

I have a few problems with the apache logs for virtual servers, on GPL edition:

First problem is that after the last rotations, all apache logs are created with root:root. Before that they were created with server_owner:www-data. I’m not sure what I screwed up and where. On “Server Templates” -> “Default Settings” -> “Log File Rotation” the first option is on “Automatic” and the second on “Just the Apache Logs”, as they were before. In “Webmin” -> “System” -> “Log File Rotation” -> “Default options for all log files” everything is on default, except I put Daily for rotation schedule. If I enter on one of the entries for individual logrotate for virtual servers, everything is default.
Other than manually setting users for each log file and hoping this won’t happen again, do you have any ideas?

Also, I have a second problem: before this happened, log files were created with “server_owner” user and “www-data” group. But I have the /home partition with user quota and group quota enabled, so all logs were counted towards user quota. This caused a strange thing: virtualmin was reporting something like 144/500 MB used, but the user could not upload any files because of disk quota exceeded for user. The user was using 498 MB, his group only 144 (he had huge access log files). Does this mean that virtualmin only uses group quota? Should I disable user quota for /home partition to get accurate counts?

Thank you.

Oh yes, and I forgot to say, current log files are no longer linked to /logs on user’s home.

I forgot to say i’m running Ubuntu 10.04 LTS, x64.

I just created a new virtual server, just for testing, and it got created with (IMHO) correct owner and
www-data as a group. But I don’t know if ownership will survive next logrotate cycle. I will let you know.

My second problem remains: I don’t know what to do with the quota reported by VirtualMin. Apparently it still only counts group quota only. I was considering disabling user quota but that I don’t think will be a solution. Log files should be included in domain quota after all…

The biggest problem here is that files used by a domain have different permissions schemes. For example, mysql files are stored as “mysql” user and the group of the domain owner, while the log files I was talking above (apache acces and error logs) are stored exactly the opposite way, the user is the domain owner and the group is “www-data”. I’m not sure how a situation like this can be handled. You can’t just add user and group quotas, a lot of files are overlapped. You can’t report the biggest either, because of the same overlapping. Any ideas?!