nixos/snapraid: relax permissions of snapraid-sync

Remove PrivateDevices to silence warning about SnapRAID being
unable to access disk UUIDs.

Add CAP_FOWNER when touch is enabled so file time stamps can be
set.
This commit is contained in:
lunik1
2021-12-03 15:55:27 +00:00
parent af21d41260
commit 6073b099d0
+2 -2
View File
@@ -193,7 +193,6 @@ in
LockPersonality = true;
MemoryDenyWriteExecute = true;
NoNewPrivileges = true;
PrivateDevices = true;
PrivateTmp = true;
ProtectClock = true;
ProtectControlGroups = true;
@@ -208,7 +207,8 @@ in
SystemCallArchitectures = "native";
SystemCallFilter = "@system-service";
SystemCallErrorNumber = "EPERM";
CapabilityBoundingSet = "CAP_DAC_OVERRIDE";
CapabilityBoundingSet = "CAP_DAC_OVERRIDE" ++
lib.optionalString cfg.touchBeforeSync " CAP_FOWNER";
ProtectSystem = "strict";
ProtectHome = "read-only";