|
From: Jamie C. <jca...@we...> - 2006-11-23 23:21:22
|
On 23/Nov/2006 13:46 Leah Kubik wrote .. > We want to include the file sizes of databases created w/Virtualmin to > be > trackable through quotas in addition to data used. I can do it manually > w/say MySQL by changing the group of the db files to be the user group > for > the domain user and making sure the DB files are stored on the quota'd > file > system. I would like to automate this so that any time a database is created > for a domain, or associated w/a domain, that it's files get the group > permissions for the domain set. Could someone recommend the best place > to > add this in the code? > > Maybe an idea of something to plonk > in /usr/libexec/webmin/virtual-server/save_database.cgi ? > > Thanks for any ideas, Currently, Virtualmin attempts to sum up the size of a domain's databases and include that in the quota usage display on the Edit Virtual Server page. However, because the files under /var/lib/mysql/$dbname are not owned by the virtual server's group, they don't actually count towards the enforced quota.. Have you ever tested to see if mysql still runs when its database files have a different group owner? If it still works fine, I would consider having Virtualmin do this automatically. Of course, it would need to set the group-inheritance bit on the DB directory too, to make sure any new table files have the right ownership. - Jamie |