[MDEV-15525] ExecStartPre=/usr/bin/mysql_install_db -u mysql option does not work, wrong permissions Created: 2018-03-09 Updated: 2018-04-30 Resolved: 2018-04-30 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Server |
| Affects Version/s: | 10.2.13 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Minor |
| Reporter: | Claudio Nanni | Assignee: | Unassigned |
| Resolution: | Incomplete | Votes: | 0 |
| Labels: | need_feedback | ||
| Environment: |
Linux |
||
| Description |
|
On Systemd, if you rely on the option:
In the MariaDB systemd unit file it won't work. The datadir is created owned by root:
|
| Comments |
| Comment by Daniel Black [ 2018-04-01 ] |
|
Was this an install or upgrade? Was it an RPM or bintar? If RPM and install should of created the directory with the correct ownership https://github.com/MariaDB/server/blob/10.2/support-files/rpm/server-postin.sh#L66. Is it possible that something happened between installation and service start? In MDEV-14707 I was hoping on removing the need to have root permissions in the pre/post scripts of the service file. Do we create a mini pre-requisites service file that ensures the right directories exist? Its sounding a touch excessive. If /var/lib/mysql is created owned by root in a normal installation process, sure we should correct it, but how much checking/fixing should be the responsibility of a service script? |