about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2025-01-02 13:15:04 -0600
committerFrederick Muriuki Muriithi2025-01-03 10:30:38 -0600
commit79938a32ff1e50afc13f21951cdcf59667149f16 (patch)
treebc7080110fde557bd136599c093692ebfe66173c
parent10dafe26eb91a44775d7dcb0f9e12df72f6068fc (diff)
downloadgn-machines-79938a32ff1e50afc13f21951cdcf59667149f16.tar.gz
Set ownership for `llm-db-path`.
-rw-r--r--genenetwork/services/genenetwork.scm12
1 files changed, 8 insertions, 4 deletions
diff --git a/genenetwork/services/genenetwork.scm b/genenetwork/services/genenetwork.scm
index b93654f..03a2a2c 100644
--- a/genenetwork/services/genenetwork.scm
+++ b/genenetwork/services/genenetwork.scm
@@ -232,7 +232,7 @@
 
 (define (genenetwork-activation config)
   (match-record config <genenetwork-configuration>
-    (gn2-secrets gn3-secrets gn-auth-secrets auth-db)
+    (gn2-secrets gn3-secrets gn-auth-secrets auth-db llm-db-path)
     (with-imported-modules '((guix build utils))
       #~(begin
           (use-modules (guix build utils))
@@ -254,9 +254,13 @@
                     (append (list #$gn2-secrets)
                             (find-files #$gn2-secrets
                                         #:directories? #t)))
-          (chown #$gn3-secrets
-                 (passwd:uid (getpw "gunicorn-genenetwork3"))
-                 (passwd:gid (getpw "gunicorn-genenetwork3")))
+          (for-each (lambda (file)
+                      (chown file
+                             (passwd:uid (getpw "gunicorn-genenetwork3"))
+                             (passwd:gid (getpw "gunicorn-genenetwork3"))))
+                    (cons #$gn3-secrets
+                          (find-files #$(dirname llm-db-path)
+                                      #:directories? #t)))
           ;; Set owner-only permissions on secrets files.
           (for-each (lambda (file)
                       (chmod file #o600))