Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0db6ac2

Browse files
committed
Modif chmod to 700
1 parent c77427d commit 0db6ac2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

9.6/docker-entrypoint.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ fi
3434
if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then
3535
mkdir -p "$PGDATA"
3636
chown -R postgres "$PGDATA"
37-
chmod 777 "$PGDATA"
37+
chmod 700 "$PGDATA"
3838

3939
mkdir -p /var/run/postgresql
4040
chown -R postgres /var/run/postgresql
@@ -44,7 +44,7 @@ if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then
4444
if [ "$POSTGRES_INITDB_XLOGDIR" ]; then
4545
mkdir -p "$POSTGRES_INITDB_XLOGDIR"
4646
chown -R postgres "$POSTGRES_INITDB_XLOGDIR"
47-
chmod 777 "$POSTGRES_INITDB_XLOGDIR"
47+
chmod 700 "$POSTGRES_INITDB_XLOGDIR"
4848
fi
4949

5050
exec gosu postgres "$BASH_SOURCE" "$@"
@@ -53,7 +53,7 @@ fi
5353
if [ "$1" = 'postgres' ]; then
5454
mkdir -p "$PGDATA"
5555
chown -R "$(id -u)" "$PGDATA" 2>/dev/null || :
56-
chmod 777 "$PGDATA" 2>/dev/null || :
56+
chmod 700 "$PGDATA" 2>/dev/null || :
5757

5858
# look specifically for PG_VERSION, as it is expected in the DB dir
5959
if [ ! -s "$PGDATA/PG_VERSION" ]; then

0 commit comments

Comments
 (0)