Bug #95179 Let RPM/DEB packages modify owner of file $datadir/mysql_upgrade_info
Submitted: 29 Apr 2019 8:35 Modified: 21 May 2019 17:18
Reporter: Terje Røsten Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Installing Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: Terje Røsten CPU Architecture:Any

[29 Apr 2019 8:35] Terje Røsten
This packaging part of bug#95165.

Add scripts which changes owner of file $datadir/mysql_upgrade_info to owner
of $datadir.

How to repeat:
Install MySQL 5.7.

Upgrade to MySQL 8.0 < 8.0.16.

Run mysql_upgrade as root from local machine:

File $datadir/mysql_upgrade_info created with root:root as owner.

Suggested fix:
Switch owner of $datadir/mysql_upgrade_info to owner of $datadir (usually mysql OS user) in scripts shipped as part of DEB and RPM  packages.
[8 May 2019 13:36] Terje Røsten
New DEB and RPMS packages (8.0.16-2) have been added to repos.

These packages should reduce the risk of errors due to non-writable mysql_upgrade_info file in datadir.
[21 May 2019 17:18] Paul DuBois
Posted by developer:
Fixed in 8.0.17.

For installation from RPM or Debian packages, if the
mysql_upgrade_info file in the data directory is found to exist but
is owned by root, it is now changed to the same owner as the data
directory. The correct SELinux file context is also set.