services: mpd: Make /var/run/mpd/USER user-owned.

Fixes <https://bugs.gnu.org/44820>.
Reported by Simon <lists@netpanic.org>.

This is a followup to bb124f6e9c.

* gnu/services/audio.scm (mpd-service-activation): Chown the parent of
DIRECTORY as well.
This commit is contained in:
Ludovic Courtès 2020-12-05 15:00:48 +01:00
parent 383f087cd7
commit ce3b5e5a8d
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5

View File

@ -163,7 +163,11 @@ audio_output {
(let ((directory #$(mpd-file-name config ".mpd")))
(mkdir-p directory)
(chown directory (passwd:uid %user) (passwd:gid %user))))))
(chown directory (passwd:uid %user) (passwd:gid %user))
;; Make /var/run/mpd/USER user-owned as well.
(chown (dirname directory)
(passwd:uid %user) (passwd:gid %user))))))
(define %mpd-accounts