[MDEV-19726] MariaDB server or backup RPM install assumes mysql user exists Created: 2019-06-10  Updated: 2019-07-10  Resolved: 2019-07-04

Status: Closed
Project: MariaDB Server
Component/s: Packaging
Affects Version/s: 10.3.15
Fix Version/s: 10.2.26, 10.1.41, 10.3.17, 10.4.7

Type: Bug Priority: Minor
Reporter: J. Lewis Muir Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None
Environment:

RHEL Workstation 7.6, x86_64.



 Description   

NOTE: I set the priority of this issue to Major because I don't know where the RPM install is failing. There could be security implications for a chown command that is not able to execute successfully thus leaving whatever files or directories it was trying to change ownership of with unexpected ownership.

As root, run the command

yum install MariaDB-server MariaDB-client MariaDB-backup

which produces

chown: invalid user: 'mysql'

on the console as it's installing right after the line

  Installing : MariaDB-server-10.3.15-1.el7.centos.x86_64  9/11

So, this is likely either a problem with the MariaDB-server package (since the error message comes right after its "Installing" line) or the MariaDB-backup package (since the error message comes right before its "Installing" line).

I suspect one of these packages incorrectly assumes the mysql user exists. After the install completes, the mysql user exists--I assume because one of the three packages adds it.

If the three packages are uninstalled

yum remove MariaDB-server MariaDB-client MariaDB-backup

and then installed again

yum install MariaDB-server MariaDB-client MariaDB-backup

then this second time there is no error about the user mysql being invalid. I presume this is because the mysql user is not removed as part of the package removal and therefore the user already exists the second time around.



 Comments   
Comment by Elena Stepanova [ 2019-06-17 ]

Probably it's a bogus complaint, since the installation seems to work all right, but better to check.
Backup is unrelated, it's enough just to install the server.

$ sudo yum install MariaDB-server
...
Transaction test succeeded
Running transaction
  Installing : MariaDB-compat-10.3.16-1.el7.centos.x86_64                                                                                                                                                      1/9 
  Installing : MariaDB-common-10.3.16-1.el7.centos.x86_64                                                                                                                                                      2/9 
  Installing : MariaDB-client-10.3.16-1.el7.centos.x86_64                                                                                                                                                      3/9 
  Installing : rsync-3.1.2-6.el7_6.1.x86_64                                                                                                                                                                    4/9 
  Installing : lsof-4.87-6.el7.x86_64                                                                                                                                                                          5/9 
  Installing : boost-program-options-1.53.0-27.el7.x86_64                                                                                                                                                      6/9 
  Installing : galera-25.3.26-1.rhel7.el7.centos.x86_64                                                                                                                                                        7/9 
  Installing : MariaDB-server-10.3.16-1.el7.centos.x86_64                                                                                                                                                      8/9 
chown: invalid user: ‘mysql’
 
 
PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
To do so, start the server, then issue the following commands:
...

Previous versions are most likely also affected, but I didn't check.

Generated at Thu Feb 08 08:53:53 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.