Skip to content

Commit 5e72476

Browse files
author
Kent Rancourt
committed
fix(database): fix db init file perms
1 parent 1330404 commit 5e72476

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

database/bin/boot

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ else
9292
echo "database: existing data directory found. Starting postgres..."
9393
fi
9494

95+
# Explicitly correct permissions on this file. This compensates for the fact
96+
# it may have been initially written by root above, but more importantly, if
97+
# it's already owned by root, this will correct the permissions during upgrade.
98+
chown postgres:postgres /var/lib/postgresql/9.3/main/initialized
99+
95100
# run the service in the background
96101
sudo -i -u postgres /usr/bin/postgres \
97102
-c config-file="${PG_CONFIG:-/etc/postgresql/main/postgresql.conf}" \

0 commit comments

Comments
 (0)