From 03a17932089a9a9dd074e6c70924606a4bd86bb6 Mon Sep 17 00:00:00 2001 From: Tobias Genannt Date: Fri, 30 Jul 2021 21:42:05 +0200 Subject: [PATCH] Drops privileges to user 101 and group 0 When the container is started as root the default was to drop privileges to "unit:unit". This caused some problems with temporary files. Now the privileges are drop to "101:0". When the container is started as a normal user unit prints a warning that changing the user and group is not possible. This warning is safe to ignore. --- docker/launch-netbox.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docker/launch-netbox.sh b/docker/launch-netbox.sh index 3245c38..117772f 100755 --- a/docker/launch-netbox.sh +++ b/docker/launch-netbox.sh @@ -51,4 +51,6 @@ exec unitd \ --pid /opt/unit/unit.pid \ --log /dev/stdout \ --state /opt/unit/state/ \ - --tmp /opt/unit/tmp/ + --tmp /opt/unit/tmp/ \ + --user 101 \ + --group 0