hermes - 💡(How to fix) Fix [Bug]: Installer fails with Permission denied on /root/uv.toml when run via sudo -u <user>

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

Error: error: failed to open file /root/uv.toml: Permission denied (os error 13) The installer exits with a permission error and fails to complete. Python 3.11 is not installed and the setup cannot proceed. error: failed to open file /root/uv.toml: Permission denied (os error 13)

Additional Logs / Traceback (optional)

  • Pre-installing Python 3.11 manually as the service account with --no-config before running the installer — installer calls uv python install internally anyway and hits the same error Partial workaround: running as root with UV_PYTHON_INSTALL_DIR=/usr/local/lib/uv-python bypasses the error, but all files land in /root/.hermes/ and the service runs as root — defeating the purpose of a non-root deployment.

Root Cause

Root Cause Analysis (optional)

Fix Action

Fix / Workaround

Attempted workarounds that did not resolve the issue:
- sudo -u <service-account> -H (sets HOME correctly but uv still reads /root/uv.toml)
- Pre-installing Python 3.11 manually as the service account with --no-config before running the installer — installer calls uv python install internally anyway and hits the same error

Partial workaround: running as root with UV_PYTHON_INSTALL_DIR=/usr/local/lib/uv-python bypasses the error, but all files land in /root/.hermes/ and the service runs as root — defeating the purpose of a non-root deployment.

Code Example

System info: https://paste.rs/ynhBL
Agent log: https://paste.rs/Cpqtv
Gateway log: https://paste.rs/pBOZv

Note: links expire after 6 hours.

---

Attempted workarounds that did not resolve the issue:
- sudo -u <service-account> -H (sets HOME correctly but uv still reads /root/uv.toml)
- Pre-installing Python 3.11 manually as the service account with --no-config before running the installer — installer calls uv python install internally anyway and hits the same error

Partial workaround: running as root with UV_PYTHON_INSTALL_DIR=/usr/local/lib/uv-python bypasses the error, but all files land in /root/.hermes/ and the service runs as root — defeating the purpose of a non-root deployment.
RAW_BUFFERClick to expand / collapse

Bug Description

The installer fails during the Python 3.11 step when run under a dedicated service account (tested with sudo -u <service-account> and sudo -u <service-account> -H). uv resolves config paths against the process owner's home directory (root) rather than the effective user's, so the service account can't read /root/uv.toml.

Error: error: failed to open file /root/uv.toml: Permission denied (os error 13) ✗ Failed to install Python 3.11

Steps to Reproduce

  1. Create a dedicated non-root service account
  2. Run the installer via: sudo -u <service-account> bash -c 'curl -fsSL <installer-url> | bash'
  3. Installer fails at the Python 3.11 step with Permission denied on /root/uv.toml

Expected Behavior

The installer should complete successfully when run under a non-root service account. Internal uv python install calls should pass --no-config so no config file is read regardless of who runs the installer.

Actual Behavior

The installer exits with a permission error and fails to complete. Python 3.11 is not installed and the setup cannot proceed.

error: failed to open file /root/uv.toml: Permission denied (os error 13) ✗ Failed to install Python 3.11 → Install Python 3.11 manually, then re-run this script

Affected Component

Setup / Installation

Messaging Platform (if gateway-related)

No response

Debug Report

System info: https://paste.rs/ynhBL
Agent log: https://paste.rs/Cpqtv
Gateway log: https://paste.rs/pBOZv

Note: links expire after 6 hours.

Operating System

Ubuntu 24.04 LTS

Python Version

3.11.9

Hermes Version

2.1.0

Additional Logs / Traceback (optional)

Attempted workarounds that did not resolve the issue:
- sudo -u <service-account> -H (sets HOME correctly but uv still reads /root/uv.toml)
- Pre-installing Python 3.11 manually as the service account with --no-config before running the installer — installer calls uv python install internally anyway and hits the same error

Partial workaround: running as root with UV_PYTHON_INSTALL_DIR=/usr/local/lib/uv-python bypasses the error, but all files land in /root/.hermes/ and the service runs as root — defeating the purpose of a non-root deployment.

Root Cause Analysis (optional)

No response

Proposed Fix (optional)

Pass --no-config to all internal uv python install calls in the installer script so that uv does not attempt to read any config file regardless of who runs the installer.

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING