File tree Expand file tree Collapse file tree 3 files changed +19
-2
lines changed Expand file tree Collapse file tree 3 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -260,6 +260,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
260
260
261
261
## Versions
262
262
263
+ * ** 16.09.21:** - Fix slow ` chown ` on large workspace (contents of workspace folder no longer chowned).
263
264
* ** 11.07.21:** - Bump node to 14 to fix builds
264
265
* ** 08.05.21:** - Fix doc link
265
266
* ** 04.02.20:** - Allow setting gui password via hash using env var ` HASHED_PASSWORD ` .
Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ app_setup_block: |
75
75
76
76
# changelog
77
77
changelogs :
78
+ - { date: "16.09.21:", desc: "Fix slow `chown` on large workspace (contents of workspace folder no longer chowned)." }
78
79
- { date: "11.07.21:", desc: "Bump node to 14 to fix builds" }
79
80
- { date: "08.05.21:", desc: "Fix doc link" }
80
81
- { date: "04.02.20:", desc: "Allow setting gui password via hash using env var `HASHED_PASSWORD`." }
Original file line number Diff line number Diff line change @@ -18,5 +18,20 @@ if [ -n "${SUDO_PASSWORD}" ] || [ -n "${SUDO_PASSWORD_HASH}" ]; then
18
18
fi
19
19
20
20
# permissions
21
- chown -R abc:abc \
22
- /config
21
+ if [ -f "/usr/bin/find" ] && [ -f "/usr/bin/xargs" ]; then
22
+ CORES=$(nproc --all)
23
+
24
+ # Split workload between config and workspace
25
+ echo "setting permissions::configuration"
26
+ find /config -path /config/workspace -prune -false -o -type d -print0 | \
27
+ xargs --null -r --max-args=1 --max-procs=$((CORES*2*8)) \
28
+ chown -R abc:abc
29
+
30
+ echo "setting permissions::workspace"
31
+ chown abc:abc /config/workspace
32
+ else
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
+ fi
You can’t perform that action at this time.
0 commit comments