Skip to content

fix(dashboard): don't force /opt/data files root for remote requests on host installs#44139

Open
AIalliAI wants to merge 1 commit into
NousResearch:mainfrom
AIalliAI:fix/44116-files-root-non-docker
Open

fix(dashboard): don't force /opt/data files root for remote requests on host installs#44139
AIalliAI wants to merge 1 commit into
NousResearch:mainfrom
AIalliAI:fix/44116-files-root-non-docker

Conversation

@AIalliAI

Copy link
Copy Markdown
Contributor

Summary

Fixes #44116

On a non-Docker host install, opening the dashboard Files tab from another machine on the LAN returned a 500:

{"detail":"Managed files root is unavailable: [Errno 13] Permission denied: '/opt/data'"}

_managed_files_policy treated any non-local request (remote client, or auth_required set) as a hosted deployment and locked the managed-files root to /opt/data — a path that only exists in the Docker/hosted filesystem layout.

Change

  • The /opt/data lock now applies only when the install actually uses the hosted layout, detected via the existing _default_hermes_root_is_opt_data() check (HERMES_HOME resolving to /opt/data, which the official Docker setup sets).
  • Remote and auth-gated requests on plain host installs keep a locked root — the dashboard user's home (locked_root=home, can_change_path=False) — so the previous confinement posture for non-local clients is preserved, just no longer pointing at a Docker-only path. Local requests keep the existing unlocked home policy.
  • HERMES_DASHBOARD_FILES_ROOT continues to override everything, so the workaround from the issue keeps working.

Tests

Added to tests/hermes_cli/test_web_server_files.py:

  • remote request on a host install (no HERMES_HOME) → policy locks to home, no 500
  • auth_required=True on a host install → policy locks to home
  • remote request with HERMES_HOME=/opt/data → still locked to /opt/data (hosted behavior unchanged)

pytest tests/hermes_cli/ -k web_server: 306 passed; the one failure (test_skills_list_without_profile_uses_dashboard_home) is a pre-existing test-ordering flake that also fails on unmodified main and passes in isolation.

🤖 Generated with Claude Code

…on host installs

The managed-files policy treated every non-local dashboard request as a
hosted (Docker) deployment and locked the Files tab to /opt/data. On a
plain host install reached over the LAN, that path doesn't exist (or
isn't readable by the dashboard user), so the Files tab returned a 500:

    {"detail": "Managed files root is unavailable: [Errno 13] Permission denied: '/opt/data'"}

The hosted layout is already detected directly via HERMES_HOME resolving
to /opt/data, so use only that signal to apply the /opt/data lock.
Remote and auth-gated requests on host installs keep a locked root —
the dashboard user's home — preserving the previous confinement posture
without pointing at a Docker-only path.

Fixes NousResearch#44116

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@AIalliAI

Copy link
Copy Markdown
Contributor Author

Requesting maintainer review — this is ready to land from my side. Standalone fork CI is pending first-run approval here; the rollup branch in #44061 carrying this session's batch is fully green on upstream CI (all test shards, typecheck, e2e).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/config Config system, migrations, profiles area/docker Docker image, Compose, packaging comp/gateway Gateway runner, session dispatch, delivery P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Remote dashboard Files tab forces /opt/data on non-Docker host installs

2 participants