agents: work/ in the disk-metric docs, holder never sees work/, chown guard comment
This commit is contained in:
parent
6ff348d88b
commit
d2ea50031e
8 changed files with 42 additions and 16 deletions
|
|
@ -210,7 +210,9 @@ in
|
|||
chown -hR "$userName:$userName" "/agents/$userName/harness" 2>/dev/null || true
|
||||
fi
|
||||
# work/ holds large build trees and the agent creates everything in
|
||||
# it, so only an ownership mismatch on the top dir needs a full walk.
|
||||
# it, so a full walk is only needed when the top dir is not already
|
||||
# the agent's: that covers a dir hive-c0re just created as hive-core
|
||||
# and an agent uid that changed. Otherwise activation does one stat.
|
||||
if [ -d "/agents/$userName/work" ]; then
|
||||
if [ "$(stat -c %U "/agents/$userName/work")" != "$userName" ]; then
|
||||
chown -hR "$userName:$userName" "/agents/$userName/work" 2>/dev/null || true
|
||||
|
|
|
|||
Loading…
Reference in a new issue