From 79938a32ff1e50afc13f21951cdcf59667149f16 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Thu, 2 Jan 2025 13:15:04 -0600 Subject: Set ownership for `llm-db-path`. --- genenetwork/services/genenetwork.scm | 12 ++++++++---- 1 file 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 - (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)) -- cgit v1.2.3