Closed issue by dashezup on void-packages repository https://github.com/void-linux/void-packages/issues/30932 Description: ### System * xuname: `Void 5.11.12_1 x86_64 GenuineIntel notuptodate FFFFF` * package: `mariadb-10.5.9_1` ### Expected behavior install mariadb without showing errors. ### Actual behavior shows this error because the INSTALL script runs `mysql_install_db` with mysql user which runs `chown` ``` chown: changing ownership of '/usr/lib/mysql/plugin/auth_pam_tool_dir/auth_pam_tool': Operation not permitted Couldn't set an owner to '/usr/lib/mysql/plugin/auth_pam_tool_dir/auth_pam_tool'. It must be root, the PAM authentication plugin doesn't work otherwise.. chown: changing ownership of '/usr/lib/mysql/plugin/auth_pam_tool_dir': Operation not permitted Cannot change ownership of the '/usr/lib/mysql/plugin/auth_pam_tool_dir' directory to the 'mysql' user. Check that you have the necessary permissions and try again. ``` ### Steps to reproduce the behavior `xbps-install mariadb` ### Solutions The following are solutions I can think of to solve this 1. run `mysql_install_db` with root instead of mysql in INSTALL script, it would be like this https://github.com/dashezup/void-packages/commit/4689aa1a92b8e3361213a93386075a4a0ed05ca5 btw I'm a bit confused about the `UPDATE` variable for INSTALL script > $UPDATE: set to yes if package is being upgraded, no if package is being installed or removed. so how did it not being triggered when the package was "removed"? (I know it shouldn't) 2. not run `mysql_install_db` at all. may mention the command in INSTALL.msg, and may include one for update as well just like what [the arch linux package do](https://github.com/archlinux/svntogit-packages/blob/packages/mariadb/trunk/mariadb.install) 3. `chown mysql:mysql /usr/lib/mysql/plugin/auth_pam_tool_dir/auth_pam_tool /usr/lib/mysql/plugin/auth_pam_tool_dir` in post_install() or somewhere else, so that the mysql user will be able to chown for that two files. @Veganizer hey check this