From 1c59eb02367b75d27e033d02dc25d5e443f48195 Mon Sep 17 00:00:00 2001 From: Roland Geider Date: Thu, 15 Oct 2020 22:56:22 +0200 Subject: [PATCH] Leave user wger as owner for db folder The apache process still has the group permissions to write the sqlite file --- docs/production.rst | 3 ++- extras/docker/apache/Dockerfile | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/production.rst b/docs/production.rst index ccbcbce67..38580f658 100644 --- a/docs/production.rst +++ b/docs/production.rst @@ -88,7 +88,8 @@ If using sqlite, create a folder for it (must be writable by the apache user):: mkdir db touch db/database.sqlite - chmod -R o+w db + chown :www-data -R /home/wger/db + chmod g+w /home/wger/db /home/wger/db/database.sqlite Application ----------- diff --git a/extras/docker/apache/Dockerfile b/extras/docker/apache/Dockerfile index 4bfadc31a..ff746b1a7 100644 --- a/extras/docker/apache/Dockerfile +++ b/extras/docker/apache/Dockerfile @@ -100,6 +100,7 @@ RUN mkdir -p ~/static/CACHE ~/media \ USER root RUN apt-get remove build-essential -y \ && apt autoremove -y \ - && chown www-data:www-data -R /home/wger/db + && chown :www-data -R /home/wger/db \ + && chmod g+w /home/wger/db /home/wger/db/database.sqlite ENTRYPOINT ["/home/wger/entrypoint.sh"]