In the standard mysql setup on debian squeeze all files in /etc/mysql are owned by root. Can it be changed, so that mysql is the new owner or does it have a reason why they should stay by root?
4 Answers
It can be changed. The main reason that it's root is because the mysql user doesn't have a shell. The user isn't meant to be making changes to the configuration of the service, root or any other group defined by you should . Think of it as a form of privilege separation.
MySQLd runs as root and drops its privileges afterward. Those files are considered sensitive (since it contains your configuration files and such) and should remain as root.
If user mysql
doesn't need to write to a particular file it doesn't need to own it. Files in /etc/mysql are configuration files which should only be writable by a system administrator e.g. root.
Yes, it can be changed. The main reason that it's root is because the mysql user doesn't have a shell. The user isn't meant to be making changes to the configuration of the service, root or any other group defined by you should . Think of it as a form of privilege separation.