Skip to content

Commit 6f65c43

Browse files
authored
Merge pull request #152 from kkimurak/hotfix-chmod-failue
fix PG_DATADIR initialization for cases when empty or contains too many files
2 parents 0c081e0 + ea51b26 commit 6f65c43

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

runtime/functions

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ create_datadir() {
2929
echo "Initializing datadir..."
3030
mkdir -p ${PG_HOME}
3131
if [[ -d ${PG_DATADIR} ]]; then
32-
chmod 0600 $( find ${PG_DATADIR} -type f )
33-
chmod 0700 $( find ${PG_DATADIR} -type d )
32+
find ${PG_DATADIR} -type f | xargs chmod 0600
33+
find ${PG_DATADIR} -type d | xargs chmod 0700
3434
fi
3535
chown -R ${PG_USER}:${PG_USER} ${PG_HOME}
3636
}

0 commit comments

Comments
 (0)