From 5c7ac4e37589a7a684dfb2a29ed24563233bbd82 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 3 Dec 2016 17:57:00 +0000 Subject: [PATCH] Permissions --- src/freedombone-app-xmpp | 1 + src/freedombone-utils-setup | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/freedombone-app-xmpp b/src/freedombone-app-xmpp index 38d86d37..e20c9883 100755 --- a/src/freedombone-app-xmpp +++ b/src/freedombone-app-xmpp @@ -642,6 +642,7 @@ function install_xmpp_main { prosodyctl register $MY_USERNAME $DEFAULT_DOMAIN_NAME "$XMPP_PASSWORD" if [ ! "$?" = "0" ]; then + remove_xmpp echo $'Unable to register prosody user' exit 347682 fi diff --git a/src/freedombone-utils-setup b/src/freedombone-utils-setup index 93bbdfb2..10a72c5f 100755 --- a/src/freedombone-utils-setup +++ b/src/freedombone-utils-setup @@ -515,10 +515,11 @@ function lockdown_permissions { if [ ! -d /var/lib/saned ]; then mkdir /var/lib/saned fi - if [ ! -d /etc/prosody ]; then + if [ -d /etc/prosody ]; then chown -R prosody /etc/prosody + chmod -R 700 /etc/prosody/conf.d fi - if [ ! -d /var/lib/prosody ]; then + if [ -d /var/lib/prosody ]; then chown -R prosody /var/lib/prosody fi }