[MDEV-11721] MariaDB Systemd service does not start when 'chroot' option is activated in my.cnf Created: 2017-01-04 Updated: 2018-01-27 Resolved: 2018-01-27 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Configuration |
| Affects Version/s: | 10.1.20 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Jérémie LEGRAND | Assignee: | Sergey Vojtovich |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | need_feedback, systemd | ||
| Environment: |
Debian 8 x64 |
||
| Description |
|
When configuring a chroot environment, with 'chroot = /srv/chroot-mariadb' in my.cnf:
Fails with error "[ERROR] chroot: Operation not permitted" in syslog But if I start the daemon manually:
OK, server started and chrooted And if I create a false init.d script, just to create new systemd service:
OK, server started and chrooted To reproduce the chroot environment:
|
| Comments |
| Comment by Daniel Black [ 2017-12-18 ] |
|
The case is mysqld is run with the user mysql which is non-privledged and cannot chroot. You could set RootDirectory= as a systemd directive (see https://mariadb.com/kb/en/library/systemd/ ) and then remove chroot from my.cnf. Is this acceptable? |
| Comment by Elena Stepanova [ 2018-01-22 ] |
| Comment by Jérémie LEGRAND [ 2018-01-22 ] |
|
hello, it looks like acceptable. I can't test as my server is now in production (without chroot). But using Systemd mecahnism is a good idea. |
| Comment by Daniel Black [ 2018-01-27 ] |
|
Thanks for your feedback. I never really considered the use of chroot with systemd but I'm glad there was a workaround. Thanks for using MariaDB. |