From 4e046f4d386b84e32a87cd860d15cb48bc58c680 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sat, 27 Aug 2016 01:38:38 -0400 Subject: [PATCH] Secure password file --- functions | 1 + 1 file changed, 1 insertion(+) diff --git a/functions b/functions index bfc182e..dd1ac10 100755 --- a/functions +++ b/functions @@ -372,6 +372,7 @@ service_create() { password=$(openssl rand -hex 16) echo "$rootpassword" > "$SERVICE_ROOT/ROOTPASSWORD" echo "$password" > "$SERVICE_ROOT/PASSWORD" + chmod 640 "$SERVICE_ROOT/ROOTPASSWORD" "$SERVICE_ROOT/PASSWORD" touch "$LINKS_FILE" if [[ -n $MONGO_CUSTOM_ENV ]]; then