diff docker/base/Dockerfile @ 117:834bedf42332

docker (base): create sat.conf in ~sat/.config/sat with right permissions so it is not created by set_account_domain
author Goffi <goffi@goffi.org>
date Tue, 08 Mar 2016 13:52:11 +0100
parents 8b228fd053bc
children 5d2eb2f61dc8
line wrap: on
line diff
--- a/docker/base/Dockerfile	Fri Mar 04 23:31:26 2016 +0100
+++ b/docker/base/Dockerfile	Tue Mar 08 13:52:11 2016 +0100
@@ -85,7 +85,13 @@
 echo '[DEFAULT]\npid_dir=/tmp\n\n\
 # we auto-create libervia account if it doesn't exists in Libervia container
 # so we remove it from reserved_list in plugin account
-[plugin account]\nreserved_list=' >> /etc/sat.conf
+[plugin account]\nreserved_list=' >> /etc/sat.conf && \
+
+# we create a sat.conf in sat user's XDG directory
+# else it would be created by set_account_domain with root only permissions
+mkdir -p /home/sat/.config/sat && touch /home/sat/.config/sat/sat.conf && \
+chown -R sat:sat /home/sat/.config && chmod 0700 /home/sat/.config/sat && \
+chmod 0600 /home/sat/.config/sat/sat.conf
 
 ##########
 # LAUNCH #