File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 34
34
if [ " $1 " = ' postgres' ] && [ " $( id -u) " = ' 0' ]; then
35
35
mkdir -p " $PGDATA "
36
36
chown -R postgres " $PGDATA "
37
- chmod 777 " $PGDATA "
37
+ chmod 700 " $PGDATA "
38
38
39
39
mkdir -p /var/run/postgresql
40
40
chown -R postgres /var/run/postgresql
@@ -44,7 +44,7 @@ if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then
44
44
if [ " $POSTGRES_INITDB_XLOGDIR " ]; then
45
45
mkdir -p " $POSTGRES_INITDB_XLOGDIR "
46
46
chown -R postgres " $POSTGRES_INITDB_XLOGDIR "
47
- chmod 777 " $POSTGRES_INITDB_XLOGDIR "
47
+ chmod 700 " $POSTGRES_INITDB_XLOGDIR "
48
48
fi
49
49
50
50
exec gosu postgres " $BASH_SOURCE " " $@ "
53
53
if [ " $1 " = ' postgres' ]; then
54
54
mkdir -p " $PGDATA "
55
55
chown -R " $( id -u) " " $PGDATA " 2> /dev/null || :
56
- chmod 777 " $PGDATA " 2> /dev/null || :
56
+ chmod 700 " $PGDATA " 2> /dev/null || :
57
57
58
58
# look specifically for PG_VERSION, as it is expected in the DB dir
59
59
if [ ! -s " $PGDATA /PG_VERSION" ]; then
You can’t perform that action at this time.
0 commit comments