Skip to content

Commit 922d6d1

Browse files
authored
Parallelise /var/www chown to speed it up
Should help with machines affected by overlay cow bug
1 parent 5a4c8ec commit 922d6d1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

root/etc/cont-init.d/50-config

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,10 @@ fi
105105

106106
# set permissions
107107
chown -R abc:abc \
108-
/config \
109-
/var/www/
108+
/config
109+
110+
find /var/www -print0 | xargs -P "$(nproc)" -I {} -0 chown -h abc:abc {}
111+
find /var/www -print0 -type d | xargs -P "$(nproc)" -I {} -0 chown -h abc:abc {}
110112

111113
# set lockfile to avoid DB waits for this specific container
112114
touch /dbwait.lock

0 commit comments

Comments
 (0)