Cron directory ownership on Docker container restart
Cluster 41966. Data as of
Nothing open on GitHub. Fix merged in #41976 on 10 Jun 2026. Check it covers your case.
The short answer
- Known?
- Yes. 3 related items grouped here, 1 issue already closed.
- Fix event
- A fix was merged to main in PR #41976. Check it covers your case. No release data is tracked.
- Tracker
- The maintainers' tracker marks this
resolved, deciding PR #41976. That is separate from the fix event. - Still open
- Nothing open on GitHub.
The members concern ownership of the cron/ directory not being restored when a container restarts, including one bug report and two titles describing changes to chown or repair cron ownership at boot. The titles alone do not show whether any change was merged or whether the problem is fixed.
Open issues0
Open PRs0
Fixes on record
-
#41976 Repair cron ownership on container restart
files:
docker/stage2-hook.sh,tests/test_docker_home_override_scripts.pyShow the diff
-
docker/stage2-hook.sh@@ -262,6 +262,14 @@ if [ -d "$HERMES_HOME/profiles" ]; then chown -R hermes:hermes "$HERMES_HOME/profiles" 2>/dev/null || true fi +# Always reset ownership of $HERMES_HOME/cron on every boot for the same +# docker-exec/root-write reason as profiles/. The cron scheduler state +# (jobs.json) must stay readable by the unprivileged hermes runtime even +# after root-context maintenance commands or scheduler writes. +if [ -d "$HERMES_HOME/cron" ]; then + chown -R hermes:hermes "$HERMES_HOME/cron" 2>/dev/null || true +fi + # Reset ownership of hermes-owned top-level state files on every boot. # The targeted data-volume chown above only covers hermes-owned # *subdirectories*; loose state files living directly under $HERMES_HOME -
tests/test_docker_home_override_scripts.py@@ -6,6 +6,7 @@ REPO_ROOT = Path(__file__).resolve().parent.parent DASHBOARD_RUN = REPO_ROOT / "docker" / "s6-rc.d" / "dashboard" / "run" MAIN_WRAPPER = REPO_ROOT / "docker" / "main-wrapper.sh" +STAGE2_HOOK = REPO_ROOT / "docker" / "stage2-hook.sh" def test_main_wrapper_preserves_docker_workdir() -> None: @@ -77,3 +78,14 @@ def test_dashboard_run_does_not_derive_insecure_from_bind_host() -> None: assert truthy in text, ( f"HERMES_DASHBOARD_INSECURE should accept truthy value {truthy!r}" ) + + +def test_stage2_hook_repairs_profiles_and_cron_ownership_on_every_boot() -> None: + """profiles/ and cron/ must both be reclaimed after root-context writes.""" + text = STAGE2_HOOK.read_text(encoding="utf-8") + + assert 'if [ -d "$HERMES_HOME/profiles" ]; then' in text + assert 'chown -R hermes:hermes "$HERMES_HOME/profiles" 2>/dev/null || true' in text + + assert 'if [ -d "$HERMES_HOME/cron" ]; then' in text + assert 'chown -R hermes:hermes "$HERMES_HOME/cron" 2>/dev/null || true' in text
-
1 PR closed without merging
From the close comments: superseded by another PR 1
-
#41981 fix(docker): unconditionally chown cron/ on container boot · superseded by another PR →
#41976,#41966
Closed issues · 1
- Closed#41966[Bug]: `cron/` directory ownership not restored on container restart
How this cluster was grouped
-
Link evidence (
structural links throughout): every member is connected by structural evidence: shared changed files, or a closing/superseded reference. -
Pairwise link density
0.67: the share of item pairs that carry a link, counting a structural link in full and a relevance-only link at 0.36.1.00means every pair is linked.
Pick up a Lab task
Check whether a fix covers the open issues here, with your own agent. Bring back evidence for maintainers.
Open the LabAt a glance
- Merged PRs
- #41976
- Closed issues
- 1
- Attempts
- 1 PR closed without merging
- Fix link checked
- 10 Jun 2026