From e0ce5c700510ac83a16731c6e11c5ba4c6c94478 Mon Sep 17 00:00:00 2001 From: Sameer Naik Date: Thu, 4 Sep 2014 14:21:43 +0530 Subject: [PATCH] make sure /var/run/postgresql has the right permissions Users should be able mount at volume at /var/run/postgresql so as to expose the postgresql unix socket. --- start | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/start b/start index a08bb44..1a0b248 100755 --- a/start +++ b/start @@ -10,6 +10,11 @@ PG_DATADIR="/var/lib/postgresql/${PG_VERSION}/main" chown -R postgres:postgres /var/lib/postgresql chmod 700 /var/lib/postgresql +# fix permissions and ownership of /var/run/postgresql +chown -R postgres:postgres /var/run/postgresql +chmod 775 /var/run/postgresql +chmod g+s /var/run/postgresql + # disable ssl sed 's/ssl = true/#ssl = true/' -i ${PG_CONFDIR}/postgresql.conf