Subject: [PATCH] services: readymedia: Change cache and log directory permissions to 755.

From: Sughosha <[email-masked]>
Date: Tue, 11 Mar 2025 08:33:06 +0530

Create cache directory and log directory with 755 permission, which passes
run-readymedia-test.

* gnu/services/upnp.scm (readymedia-activation): Change directory permissions
of cache-directory and log-directory to 755.

Change-Id: Iff30040c3fd52564510f66d3568dab0ef89e0449
---
 gnu/services/upnp.scm | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/gnu/services/upnp.scm b/gnu/services/upnp.scm
index c125c07af24..47c32f0a1ef 100644
--- a/gnu/services/upnp.scm
+++ b/gnu/services/upnp.scm
@@ -188,10 +188,14 @@ (define (readymedia-activation config)
                         (mkdir-p/perms directory
                                        (getpw #$%readymedia-user-account)
                                        #o775)))
-                    (list #$cache-directory
-                          #$log-directory
-                          #$@(map readymedia-media-directory-path
-                                  media-directories)))))))
+                    (list #$@(map readymedia-media-directory-path
+                                  media-directories)))
+          (for-each (lambda (directory)
+                      (unless (file-exists? directory)
+                        (mkdir-p/perms directory
+                                       (getpw #$%readymedia-user-account)
+                                       #o755)))
+                    (list #$cache-directory #$log-directory))))))
 
 (define readymedia-service-type
   (service-type

base-commit: 42773718d5d5d42137ac84826850256fd6bed606
-- 
2.48.1