From 5b8a983be2a302fda6a7b8f9b27fe0e8919e9353 Mon Sep 17 00:00:00 2001 From: andryyy Date: Tue, 12 Mar 2019 23:23:38 +0100 Subject: [PATCH] [Update, Config] Set mode 600 for mailcow.conf --- generate_config.sh | 3 +++ update.sh | 1 + 2 files changed, 4 insertions(+) diff --git a/generate_config.sh b/generate_config.sh index a882ec08c..8cde0ffdf 100755 --- a/generate_config.sh +++ b/generate_config.sh @@ -16,6 +16,7 @@ if [ -f mailcow.conf ]; then case $response in [yY][eE][sS]|[yY]) mv mailcow.conf mailcow.conf_backup + chmod 600 mailcow.conf_backup ;; *) exit 1 @@ -237,5 +238,7 @@ EOF mkdir -p data/assets/ssl +chmod 600 mailcow.conf + # copy but don't overwrite existing certificate cp -n data/assets/ssl-example/*.pem data/assets/ssl/ diff --git a/update.sh b/update.sh index 4fc668fba..05e549288 100755 --- a/update.sh +++ b/update.sh @@ -101,6 +101,7 @@ while (($#)); do done [[ ! -f mailcow.conf ]] && { echo "mailcow.conf is missing"; exit 1;} +chmod 600 mailcow.conf source mailcow.conf DOTS=${MAILCOW_HOSTNAME//[^.]}; if [ ${#DOTS} -lt 2 ]; then