changeset 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 d0a5db5b9bdf
children 12cb931dbea0
files docker/base/Dockerfile
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
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 #