nixos/cupsd: Fix permissions on shared directories

`/var/cache`, `/var/lib`, and `/var/spool` all have 0755 permissions by
default, so should probably be created as such in this script.

See #357447 for discussion.
This commit is contained in:
Victor Engmark 2024-11-29 15:00:49 +13:00
parent 5aa819d0e0
commit 7389d32232
No known key found for this signature in database

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,