aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2020-12-05 15:00:48 +0100
committerLudovic Courtès <ludo@gnu.org>2020-12-06 23:18:08 +0100
commitce3b5e5a8d8566162201cb778c4586f94a626dfa (patch)
tree5831db17d464f4dccf8a6e72dcab471df0f94d23
parent383f087cd74316d26c5c0f19b73bc620312c5477 (diff)
downloadguix-ce3b5e5a8d8566162201cb778c4586f94a626dfa.tar
guix-ce3b5e5a8d8566162201cb778c4586f94a626dfa.tar.gz
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 bb124f6e9c0af0a23736f233c2ea2c9c9b4a40a6. * gnu/services/audio.scm (mpd-service-activation): Chown the parent of DIRECTORY as well.
-rw-r--r--gnu/services/audio.scm6
1 files changed, 5 insertions, 1 deletions
diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm
index 627b941871..c60053f33c 100644
--- a/gnu/services/audio.scm
+++ b/gnu/services/audio.scm
@@ -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