diff --git a/package/debian/postinst b/package/debian/postinst index 05daa43d5a..dd4e2d9870 100755 --- a/package/debian/postinst +++ b/package/debian/postinst @@ -86,7 +86,8 @@ case "$1" in fi # Chown definitions created by SBT Native Packager - chown thehive:thehive /var/log/thehive + touch /var/log/thehive/application.log + chown -R thehive:thehive /var/log/thehive chown root:thehive /etc/thehive/application.conf /etc/thehive/logback.xml /etc/thehive/secret.conf chmod 0640 /etc/thehive/application.conf /etc/thehive/logback.xml /etc/thehive/secret.conf test -x /bin/systemctl && /bin/systemctl daemon-reload || /bin/true diff --git a/package/docker/Dockerfile b/package/docker/Dockerfile index 6c25d72119..e9d948976d 100644 --- a/package/docker/Dockerfile +++ b/package/docker/Dockerfile @@ -55,6 +55,7 @@ RUN apt update && \ mkdir /etc/thehive && \ cp /opt/thehive/conf/logback.xml /etc/thehive/logback.xml && \ chown -R root:root /opt/thehive && \ + touch /var/log/thehive/application.log && \ chown -R thehive:thehive /var/log/thehive /etc/thehive && \ chmod +x /opt/thehive/entrypoint