nixos/clamav: run as clamav user not root
This commit is contained in:
parent
ef6b8ff15a
commit
eb746540a9
1 changed files with 4 additions and 0 deletions
|
@ -110,6 +110,8 @@ in
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${pkg}/bin/clamd";
|
ExecStart = "${pkg}/bin/clamd";
|
||||||
ExecReload = "${pkgs.coreutils}/bin/kill -USR2 $MAINPID";
|
ExecReload = "${pkgs.coreutils}/bin/kill -USR2 $MAINPID";
|
||||||
|
User = clamavUser;
|
||||||
|
Group = clamavGroup;
|
||||||
StateDirectory = "clamav";
|
StateDirectory = "clamav";
|
||||||
RuntimeDirectory = "clamav";
|
RuntimeDirectory = "clamav";
|
||||||
PrivateTmp = "yes";
|
PrivateTmp = "yes";
|
||||||
|
@ -138,6 +140,8 @@ in
|
||||||
SuccessExitStatus = "1"; # if databases are up to date
|
SuccessExitStatus = "1"; # if databases are up to date
|
||||||
StateDirectory = "clamav";
|
StateDirectory = "clamav";
|
||||||
RuntimeDirectory = "clamav";
|
RuntimeDirectory = "clamav";
|
||||||
|
User = clamavUser;
|
||||||
|
Group = clamavGroup;
|
||||||
PrivateTmp = "yes";
|
PrivateTmp = "yes";
|
||||||
PrivateDevices = "yes";
|
PrivateDevices = "yes";
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue