FS#42172 - [mpd] failed to start with group setting in /etc/mpd.conf
Attached to Project:
Arch Linux
Opened by wombalton (wombalton) - Monday, 29 September 2014, 08:58 GMT
Last edited by Gaetan Bisson (vesath) - Tuesday, 30 September 2014, 16:52 GMT
Opened by wombalton (wombalton) - Monday, 29 September 2014, 08:58 GMT
Last edited by Gaetan Bisson (vesath) - Tuesday, 30 September 2014, 16:52 GMT
|
Details
Description:
mpd won't start through systemd when a group is set in /etc/mpd.conf. Starts fine from commandline. Additional info: systemd status: Sep 29 10:44:08 bene-laptop mpd[5400]: fatal_error: Failed to set group 92: Operation not permitted Sep 29 10:44:08 bene-laptop systemd[1]: mpd.service: main process exited, code=exited, status=1/FAILURE Sep 29 10:44:08 bene-laptop systemd[1]: Unit mpd.service entered failed state. I discovered this is due systemd starts mpd with only user permission of the user mpd. /usr/lib/systemd/system/mpd.service: … [Service] User=mpd ExecStart=/usr/bin/mpd --no-daemon … And of course mpd has no right to change his group. Solution: Either delete the User=mpd part of the mpd service file and let mpd itself change the user OR add Group= part to systemd service file that matches the group of mpd.conf |
This task depends upon
Closed by Gaetan Bisson (vesath)
Tuesday, 30 September 2014, 16:52 GMT
Reason for closing: Not a bug
Tuesday, 30 September 2014, 16:52 GMT
Reason for closing: Not a bug
Note that just having User= in the service file is fine: systemd will then automatically use the default Group for that User.
If you customize mpd to deviate from those default settings, it is up to you to ensure you leave the set of configuration files in a consistent state. Cheers.
I added a paragraph in the wiki[1] to explain this for everyone.
[1] https://wiki.archlinux.org/index.php/Music_Player_Daemon/Troubleshooting#daemon:_fatal_error:_Failed_to_set_group_NN:_Operation_not_permitted
Cheers wombalton