From dfb9f473614f96946af9873d765fa57616a43704 Mon Sep 17 00:00:00 2001 From: Alexey Demidov Date: Mon, 15 Nov 2021 12:20:26 +0400 Subject: [PATCH] Fix recovery.conf incorrect ownership (#311) --- .../10/debian-10/rootfs/opt/bitnami/scripts/libpostgresql.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/bitnami/postgresql/10/debian-10/rootfs/opt/bitnami/scripts/libpostgresql.sh b/bitnami/postgresql/10/debian-10/rootfs/opt/bitnami/scripts/libpostgresql.sh index 4500abcc7ce1..45b1377ee5c2 100644 --- a/bitnami/postgresql/10/debian-10/rootfs/opt/bitnami/scripts/libpostgresql.sh +++ b/bitnami/postgresql/10/debian-10/rootfs/opt/bitnami/scripts/libpostgresql.sh @@ -897,6 +897,7 @@ postgresql_configure_recovery() { else cp -f "$POSTGRESQL_BASE_DIR/share/recovery.conf.sample" "$POSTGRESQL_RECOVERY_FILE" chmod 600 "$POSTGRESQL_RECOVERY_FILE" + am_i_root && chown "$POSTGRESQL_DAEMON_USER:$POSTGRESQL_DAEMON_GROUP" "$POSTGRESQL_RECOVERY_FILE" postgresql_set_property "standby_mode" "on" "$POSTGRESQL_RECOVERY_FILE" postgresql_set_property "primary_conninfo" "host=${POSTGRESQL_MASTER_HOST} port=${POSTGRESQL_MASTER_PORT_NUMBER} user=${POSTGRESQL_REPLICATION_USER} password=${POSTGRESQL_REPLICATION_PASSWORD} application_name=${POSTGRESQL_CLUSTER_APP_NAME}" "$POSTGRESQL_RECOVERY_FILE" postgresql_set_property "trigger_file" "/tmp/postgresql.trigger.${POSTGRESQL_MASTER_PORT_NUMBER}" "$POSTGRESQL_RECOVERY_FILE"