nixos/cupsd: Fix permissions on shared directories (#360022)

This commit is contained in:
Matthew Croughan 2024-11-29 10:02:11 +00:00 committed by GitHub
commit 1f33e2a756
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -384,6 +384,7 @@ in
preStart = lib.optionalString cfg.stateless ''
rm -rf /var/cache/cups /var/lib/cups /var/spool/cups
'' + ''
(umask 022 && mkdir -p /var/cache /var/lib /var/spool)
(umask 077 && mkdir -p /var/cache/cups /var/spool/cups)
(umask 022 && mkdir -p ${cfg.tempDir} /var/lib/cups)
# While cups will automatically create self-signed certificates if accessed via TLS,