Watch
0
0
Fork
You've already forked hyperhive
0

agents: work/ in the disk-metric docs, holder never sees work/, chown guard comment

This commit is contained in:
atlas 2026-10-05 13:23:39 +02:00
commit d2ea50031e
8 changed files with 42 additions and 16 deletions

View file

@ -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