fix(installer): chown authelia dir AFTER users_database.yml is written
This commit is contained in:
parent
101009c872
commit
5953736ddb
1 changed files with 3 additions and 1 deletions
|
|
@ -388,7 +388,6 @@ $(echo "$OIDC_KEY" | sed 's/^/ /')
|
||||||
userinfo_signed_response_alg: "none"
|
userinfo_signed_response_alg: "none"
|
||||||
AUTHEOF
|
AUTHEOF
|
||||||
$SUDO chmod 600 "$AUTHELIA_CONFIG"
|
$SUDO chmod 600 "$AUTHELIA_CONFIG"
|
||||||
$SUDO chown -R "$SVC_USER:$SVC_USER" "$AUTHELIA_DIR"
|
|
||||||
# Clean up files from Authelia tar
|
# Clean up files from Authelia tar
|
||||||
$SUDO rm -f "${AUTHELIA_DIR}/authelia.service" "${AUTHELIA_DIR}/config.template.yml" 2>/dev/null || true
|
$SUDO rm -f "${AUTHELIA_DIR}/authelia.service" "${AUTHELIA_DIR}/config.template.yml" 2>/dev/null || true
|
||||||
|
|
||||||
|
|
@ -406,6 +405,9 @@ USERSDB
|
||||||
$SUDO chmod 600 "${AUTHELIA_DIR}/users_database.yml"
|
$SUDO chmod 600 "${AUTHELIA_DIR}/users_database.yml"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Ensure everything is owned by the service user
|
||||||
|
$SUDO chown -R "$SVC_USER:$SVC_USER" "$AUTHELIA_DIR"
|
||||||
|
|
||||||
# Create systemd service for Authelia
|
# Create systemd service for Authelia
|
||||||
$SUDO tee /etc/systemd/system/authelia.service > /dev/null << AUTHSVC
|
$SUDO tee /etc/systemd/system/authelia.service > /dev/null << AUTHSVC
|
||||||
[Unit]
|
[Unit]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue