mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-03 07:21:54 +00:00
fix(install): set world-readable uv python dirs for root FHS layout
When installing as root on Linux with the default FHS layout (/usr/local/lib/hermes-agent), `uv python install` placed the managed Python under /root/.local/share/uv/python/, which non-root users cannot traverse. The shared /usr/local/bin/hermes wrapper then failed for them with "bad interpreter: Permission denied" when execing the venv python. Export UV_PYTHON_INSTALL_DIR and UV_PYTHON_BIN_DIR to /usr/local/share/uv/ in the root-FHS branch of resolve_install_layout so the managed Python is world-readable and the shared wrapper works for any user. Closes #21457
This commit is contained in:
parent
0537e2600d
commit
4efb40c325
2 changed files with 43 additions and 0 deletions
|
|
@ -268,10 +268,18 @@ resolve_install_layout() {
|
|||
fi
|
||||
INSTALL_DIR="/usr/local/lib/hermes-agent"
|
||||
ROOT_FHS_LAYOUT=true
|
||||
# Place uv-managed Python under /usr/local/share so the venv interpreter
|
||||
# is world-readable. Default uv paths land in /root/.local/share/uv,
|
||||
# which non-root users can't traverse — leaving the shared
|
||||
# /usr/local/bin/hermes wrapper unable to exec the bad-interpreter venv
|
||||
# python. See #21457.
|
||||
export UV_PYTHON_INSTALL_DIR="${UV_PYTHON_INSTALL_DIR:-/usr/local/share/uv/python}"
|
||||
export UV_PYTHON_BIN_DIR="${UV_PYTHON_BIN_DIR:-/usr/local/share/uv/bin}"
|
||||
log_info "Root install on Linux — using FHS layout"
|
||||
log_info " Code: $INSTALL_DIR"
|
||||
log_info " Command: /usr/local/bin/hermes"
|
||||
log_info " Data: $HERMES_HOME (unchanged)"
|
||||
log_info " uv Python: $UV_PYTHON_INSTALL_DIR (world-readable)"
|
||||
return 0
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue