Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Leave user wger as owner for db folder

Roland Geider1c59eb02367b
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"]