Skip to content
Snippets Groups Projects
Unverified Commit f5e6206e authored by G.J.R. Timmer's avatar G.J.R. Timmer Committed by Dominique Marcadet
Browse files

fix chown

parent 07f76f9c
No related branches found
No related tags found
No related merge requests found
...@@ -19,19 +19,19 @@ fi ...@@ -19,19 +19,19 @@ fi
# permissions # permissions
if [ -f "/usr/bin/find" ] && [ -f "/usr/bin/xargs" ]; then if [ -f "/usr/bin/find" ] && [ -f "/usr/bin/xargs" ]; then
CORES=$(nproc --all)
# Split workload between config and workspace # Split workload between config and workspace
echo "setting permissions::configuration" echo "setting permissions::configuration"
CORES=$(nproc --all) find /config -path /config/workspace -prune -false -o -type d -print0 | \
find /config -maxdepth 4 -mindepth 1 -path /config/workspace -prune -false -o -type d -print0 | \ xargs --null -r --max-args=1 --max-procs=$((CORES*2*8)) \
xargs -r --max-args=1 --max-procs=$((CORES*2*8)) \
chown -R abc:abc chown -R abc:abc
echo "setting permissions::workspace" echo "setting permissions::workspace"
chown abc:abc /config/workspace chown abc:abc /config/workspace
find /config/workspace -maxdepth 4 -mindepth 1 -type d -print0 | \
xargs -r --max-args=1 --max-procs=$((CORES*2*16)) \
chown -R abc:abc
else else
chown -R abc:abc \ # Set permissions on data mount
/config # do not decend into the workspace
chown -R abc:abc "$(ls /config -I workspace)"
chown abc:abc /config/workspace
fi fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment