nix/harness: recursive chown of /run/hive (stale root-owned files survive container restart)

This commit is contained in:
müde 2026-05-30 22:19:22 +02:00
commit 113e64e481
2 changed files with 2 additions and 2 deletions

View file

@ -45,7 +45,7 @@ in
# `+` runs ExecStartPre as root (before the User= drop) so
# we can chown the bind onto the agent user every start —
# robust against activation-script timing on first boot.
ExecStartPre = "+${pkgs.coreutils}/bin/chown ${userName}:${userName} /run/hive";
ExecStartPre = "+${pkgs.coreutils}/bin/chown -R ${userName}:${userName} /run/hive";
# Run the harness as the per-agent user (#658). claude itself
# spawned by the harness then runs as that user too — drops
# root inside the container while sudo (`NOPASSWD: ALL` by

View file

@ -55,7 +55,7 @@ in
# `+` runs ExecStartPre as root (before the User= drop) so
# we can chown the bind onto the agent user every start —
# robust against activation-script timing on first boot.
ExecStartPre = "+${pkgs.coreutils}/bin/chown ${userName}:${userName} /run/hive";
ExecStartPre = "+${pkgs.coreutils}/bin/chown -R ${userName}:${userName} /run/hive";
# Same drop-from-root as agent-base.nix (#658). Manager
# interactions with the host (rebuild approvals, config
# writes) still happen via the dedicated unix sockets