Subject: [PATCH] services: transmission: Create downloads directory.

From: [email-masked]
Date: Fri, 16 Jul 2021 20:28:31 -0400

From: Morgan Smith <[email-masked]>

* gnu/services/file-sharing.scm (transmission-daemon-activation): Create
downloads directory.

This fixes a bug where transmission doesn't have permission to create it's
download directory. This bug occurs when download-dir is configured to a
location where the transmission user doesn't have permission to create a directory.
---
 gnu/services/file-sharing.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gnu/services/file-sharing.scm b/gnu/services/file-sharing.scm
index 72cd6478d6..143fd3ed75 100644
--- a/gnu/services/file-sharing.scm
+++ b/gnu/services/file-sharing.scm
@@ -746,6 +746,7 @@ produces a Transmission settings file (@file{settings.json}) matching CONFIG."
 (define (transmission-daemon-activation config)
   "Return the Transmission Daemon activation GEXP for CONFIG."
   (let ((config-dir %transmission-daemon-configuration-directory)
+        (download-dir (transmission-daemon-configuration-download-dir config))
         (incomplete-dir-enabled
          (transmission-daemon-configuration-incomplete-dir-enabled? config))
         (incomplete-dir
@@ -769,7 +770,8 @@ produces a Transmission settings file (@file{settings.json}) matching CONFIG."
             (for-each (lambda (directory-specification)
                         (apply mkdir-p/perms directory-specification))
                       '(#$@(append
-                            `((,config-dir #o750))
+                            `((,config-dir #o750)
+                              (,download-dir #o755))
                             (if incomplete-dir-enabled
                                 `((,incomplete-dir #o750))
                                 '())
-- 
2.32.0