Comments - Installing MariaDB with yum/dnf

11 years, 3 months ago Kevin Quinn

I had an issue installing this via yum and I believe it to be a bug in the post-install scriptlet packaged in the MariaDB-Server rpm (both centos5 x86 and centos6 x86) .

If I should submit a bug report, let me know, but here is the gist of it:

Failing to first move my /etc/my.cnf somewhere else causes the post-install scriptlet in the RPM to construct a dangerous chown command.

In my case, the mysql_datadir=$basedir/$datadir

evaluates to: ""/""

That effectively ran the following command when installed:

chown -R mysql:mysql /

Needless to say, this caused a lot of problems, and all server permissions had to be corrected.

If this is a known issue, perhaps add in the instructions before installing via yum, to move the /etc/my.cnf out of the way, or consider a sanity check on that chown command? Perhaps an alternate method of determining the mysql datadir? Or maybe the script could simply temporarily move /etc/my.cnf to /etc/my.cnf.mariadb-save, before determining the mysql datadir?

Like I said, if I should submit a full bug report with all info and a way to reproduce, please let me know and I will.

Thanks, Kevin

Archived  
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.