From 0f5b86818bebc6dd8dba231b98ca02da06cb0334 Mon Sep 17 00:00:00 2001 From: Cameron Nemo Date: Tue, 2 Mar 2021 18:29:33 -0800 Subject: [PATCH] fix: update permissions on /var/lib/pgsql This directory had owner/group of root/root with a 0700 mode. Change the mode to 0755 so that postgresql can still read the subdirs. Note that the subdirs are still 0700 (with owner of postgres), so this should not expose any data. Fixes #18 --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 7c63e29..632dcdb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -39,6 +39,7 @@ COPY postgresql/pg_hba.conf /var/lib/pgsql/$PG_VERSION/data/pg_hba.conf # Change own user RUN chown -R postgres:postgres /var/lib/pgsql/$PG_VERSION/data/* +RUN chmod 0755 /var/lib/pgsql #Start postgresql RUN su - postgres -c "/usr/pgsql-10/bin/pg_ctl start -w -t 60" \