mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-22 19:15:37 +00:00
fix paperless permissions with umask
instead of running a systemd service timer
This commit is contained in:
parent
8621e2375d
commit
05deb5b979
@ -48,23 +48,12 @@
|
|||||||
before = [ "paperless.service" ];
|
before = [ "paperless.service" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Fix permissions on a regular schedule
|
|
||||||
systemd.timers.paperless-permissions = {
|
|
||||||
timerConfig = {
|
|
||||||
OnCalendar = "*-*-* *:0/5"; # Every 5 minutes
|
|
||||||
Unit = "paperless-permissions.service";
|
|
||||||
};
|
|
||||||
wantedBy = [ "timers.target" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Fix paperless shared permissions
|
# Fix paperless shared permissions
|
||||||
systemd.services.paperless-permissions = {
|
systemd.services.paperless-web.serviceConfig.UMask = lib.mkForce "0026";
|
||||||
description = "Allow group access to paperless files";
|
systemd.services.paperless-scheduler.serviceConfig.UMask =
|
||||||
serviceConfig = { Type = "oneshot"; };
|
lib.mkForce "0026";
|
||||||
script = ''
|
systemd.services.paperless-task-queue.serviceConfig.UMask =
|
||||||
find ${config.services.paperless.mediaDir} -type f -exec chmod 640 -- {} +
|
lib.mkForce "0026";
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user