MySQL databases group permissions


First, I would like to thank you for such a great product!

I’ve just searched for something on my server, and incidentally noticed that my databases has different permissions settings, as if they’re divided into two groups. Here’s a demonstration:

-$ ll -a /var/lib/mysql/ | sort
drws–S— mysql user1 …
drws–S— mysql user2 …
drws–S— mysql user3 …
drwx------ mysql mysql …
drwx------ mysql mysql …

I would expect the permissions of all the databases to look the same, e.g. all belong to ‘mysql’ gruop with drwx------ permissions, or all belong to the user’s group with drws–S— permissions.

  1. Why it’s different?
  2. Which is better? why?
  3. Should I fix it? how?

Is there a place to see the development of virtualmin? like a github repository or something?


There’s a setting in System Settings -> Server Templates -> Default -> MySQL called “Set group ownership of MySQL database files?”.

I suspect the value of that was changed after some databases had been created – as that setting only affects new databases, not existing ones.

You’re welcome to change the permission scheme to match which ever option it is that you wanted. Details of what that option does is in the help that pops up when clicking that option.