From 405984ac1329482fd1bab2840fcd7d5be2ffbc26 Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Sun, 5 Feb 2023 09:18:03 +0100 Subject: [PATCH] nixos/onlyoffice: Fix initial permissions for the documentserver data --- nixos/modules/services/web-apps/onlyoffice.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nixos/modules/services/web-apps/onlyoffice.nix b/nixos/modules/services/web-apps/onlyoffice.nix index 79ed3e43dd18..6a8a28185b5b 100644 --- a/nixos/modules/services/web-apps/onlyoffice.nix +++ b/nixos/modules/services/web-apps/onlyoffice.nix @@ -229,6 +229,9 @@ in cp -r ${cfg.package}/etc/onlyoffice/documentserver/* /run/onlyoffice/config/ chmod u+w /run/onlyoffice/config/default.json + # Allow members of the onlyoffice group to serve files under /var/lib/onlyoffice/documentserver/App_Data + chmod g+x /var/lib/onlyoffice/documentserver + cp /run/onlyoffice/config/default.json{,.orig} # for a mapping of environment variables from the docker container to json options see @@ -284,6 +287,8 @@ in group = "onlyoffice"; isSystemUser = true; }; + + nginx.extraGroups = [ "onlyoffice" ]; }; users.groups.onlyoffice = { };