File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change 19
19
20
20
# permissions
21
21
if [ -f "/usr/bin/find" ] && [ -f "/usr/bin/xargs" ]; then
22
+ CORES=$(nproc --all)
23
+
22
24
# Split workload between config and workspace
23
25
echo "setting permissions::configuration"
24
- CORES=$(nproc --all)
25
- find /config -maxdepth 4 -mindepth 1 -path /config/workspace -prune -false -o -type d -print0 | \
26
- xargs -r --max-args=1 --max-procs=$((CORES*2*8)) \
26
+ find /config -path /config/workspace -prune -false -o -type d -print0 | \
27
+ xargs --null -r --max-args=1 --max-procs=$((CORES*2*8)) \
27
28
chown -R abc:abc
28
29
29
30
echo "setting permissions::workspace"
30
31
chown abc:abc /config/workspace
31
- find /config/workspace -maxdepth 4 -mindepth 1 -type d -print0 | \
32
- xargs -r --max-args=1 --max-procs=$((CORES*2*16)) \
33
- chown -R abc:abc
34
32
else
35
- chown -R abc:abc \
36
- /config
33
+ # Set permissions on data mount
34
+ # do not decend into the workspace
35
+ chown -R abc:abc "$(ls /config -I workspace)"
36
+ chown abc:abc /config/workspace
37
37
fi
You can’t perform that action at this time.
0 commit comments