about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2025-08-22 12:16:32 -0500
committerFrederick Muriuki Muriithi2025-10-01 09:30:12 -0500
commit1c9287a78beb722e291a53176aedecd4988dbdd7 (patch)
treef525d9a2b9cb25fe50edc1602db9142d8931191d
parenta78284e5bfa5cac6b7939f18e2b9778a93aa74f4 (diff)
downloadgn-machines-1c9287a78beb722e291a53176aedecd4988dbdd7.tar.gz
gn-uploader: Change ownership of and map secrets directory.
* Change the ownership of the secrets directory and all its children
  rather than just the secrets file.
* Expose the secrets directory to the application, rather than just
  the secrets file. Make the directory writable.
-rw-r--r--genenetwork/services/genenetwork.scm7
1 files changed, 4 insertions, 3 deletions
diff --git a/genenetwork/services/genenetwork.scm b/genenetwork/services/genenetwork.scm
index 0281c5a..99e78b9 100644
--- a/genenetwork/services/genenetwork.scm
+++ b/genenetwork/services/genenetwork.scm
@@ -744,7 +744,7 @@ a @code{<genenetwork-configuration>} record."
                       (chown file
                              (passwd:uid (getpw "gunicorn-gn-uploader"))
                              (passwd:gid (getpw "gunicorn-gn-uploader"))))
-                    (append (list #$secrets)
+                    (append (list #$(dirname secrets))
                             (find-files #$sessions-dir
                                         #:directories? #t)
                             (find-files #$sqlite-databases-directory
@@ -811,8 +811,9 @@ a @code{<genenetwork-configuration>} record."
                               (source gn-uploader-conf)
                               (target source))
                              (file-system-mapping
-                              (source secrets)
-                              (target source))
+                              (source (dirname secrets))
+                              (target source)
+                              (writable? #t))
                              (file-system-mapping
                               (source data-directory)
                               (target source)