From 334b5f25de0ee4b59b6bd7dcc75a9cdf2040e54d Mon Sep 17 00:00:00 2001
From: Agate <contact@eliotberriot.com>
Date: Wed, 9 Sep 2020 10:56:15 +0200
Subject: [PATCH] Set permissions on startup

---
 root/etc/cont-init.d/20-directories | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/root/etc/cont-init.d/20-directories b/root/etc/cont-init.d/20-directories
index 12ae703..1de5d65 100755
--- a/root/etc/cont-init.d/20-directories
+++ b/root/etc/cont-init.d/20-directories
@@ -4,3 +4,17 @@ mkdir -p /run/postgresql
 mkdir -p /run/nginx
 mkdir -p /var/log/funkwhale
 mkdir -p /app/api/staticfiles
+
+# ownership
+chown -R funkwhale:funkwhale /app
+chown -R funkwhale:funkwhale /var/log/funkwhale
+chown -R funkwhale:funkwhale /run/postgresql
+
+# permission
+chmod -R 0700 /app
+chmod -R 0750 /app/api/staticfiles
+chmod -R 0750 /app/front
+chmod 0750 /app
+chmod 0750 /app/api
+
+chmod -R 0755 /var/log/funkwhale
-- 
GitLab