1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-15 17:37:22 +01:00

Fix permissions of backup secret according to Josh's comment at

https://github.com/mail-in-a-box/mailinabox/pull/150#issuecomment-53120156
This commit is contained in:
Helmuth Gronewold
2014-08-22 23:23:56 +02:00
parent a68fd6429f
commit ee9552734f
2 changed files with 5 additions and 3 deletions

View File

@@ -8,10 +8,8 @@ hide_output pip3 install rtyaml
# Create a backup directory and a random key for encrypting backups.
mkdir -p $STORAGE_ROOT/backup
if [ ! -f $STORAGE_ROOT/backup/secret_key.txt ]; then
openssl rand -base64 2048 > $STORAGE_ROOT/backup/secret_key.txt
$(umask 077; openssl rand -base64 2048 > $STORAGE_ROOT/backup/secret_key.txt)
fi
# The secret key to encrypt backups should not be world readable.
chmod 0600 $STORAGE_ROOT/backup/secret_key.txt
# Link the management server daemon into a well known location.
rm -f /usr/local/bin/mailinabox-daemon