From 30a6f02b4fb7cca2255b3a0fadf522258e5dbcff Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Wed, 30 Nov 2022 17:48:13 -0300 Subject: queue.scm: change permision of Cyrus SASL state-dir --- src/xyz/euandreh/queue.scm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/xyz/euandreh') diff --git a/src/xyz/euandreh/queue.scm b/src/xyz/euandreh/queue.scm index cca1354..88a405c 100644 --- a/src/xyz/euandreh/queue.scm +++ b/src/xyz/euandreh/queue.scm @@ -404,12 +404,15 @@ collections.OrderedDict that works in Python 2.4-2.6.") (define (cyrus-sasl-activation config) (match-record config - (state-dir) + (user state-dir) #~(begin (use-modules (guix build utils)) - (format (current-error-port) - "Creating Cyrus SASL socket directory: \"~a\".~%" #$state-dir) - (mkdir-p #$state-dir)))) + (let ((user (getpwnam #$user))) + (format (current-error-port) + "Creating Cyrus SASL socket directory: \"~a\".~%" #$state-dir) + (mkdir-p #$state-dir) + (chown #$state-dir (passwd:uid user) (passwd:gid user)) + (chmod #$state-dir #o755))))) (define (cyrus-sasl-accounts config) (match-record config -- cgit v1.2.3