fix(installer): set UV_NO_CONFIG=1 to avoid permission denied under sudo -u#21288
Closed
hllqkb wants to merge 1 commit into
Closed
fix(installer): set UV_NO_CONFIG=1 to avoid permission denied under sudo -u#21288hllqkb wants to merge 1 commit into
hllqkb wants to merge 1 commit into
Conversation
…udo -u When the installer is run via , uv resolves config file paths against the process owner's (root) home directory rather than the effective user's, causing a Permission denied error when trying to read /root/uv.toml. Setting UV_NO_CONFIG=1 prevents uv from discovering any config files (uv.toml, pyproject.toml) during installation, which is the correct behavior for a bootstrap script that manages its own environment. Fixes NousResearch#21269
|
Same issue for me, thanks for merging |
teknium1
added a commit
that referenced
this pull request
May 7, 2026
Contributor
|
Merged via #21537 — your commit was cherry-picked onto current main with authorship preserved (rebase-merge). Thanks for the clean fix! UV_NO_CONFIG is the right lever; it covers every uv subcommand the installer calls, not just |
RationallyPrime
pushed a commit
to RationallyPrime/hermes-agent
that referenced
this pull request
May 8, 2026
rmulligan
pushed a commit
to rmulligan/hermes-agent
that referenced
this pull request
May 11, 2026
JinyuID
pushed a commit
to JinyuID/hermes-agent
that referenced
this pull request
May 11, 2026
jsboige
pushed a commit
to jsboige/hermes-agent
that referenced
this pull request
May 14, 2026
gweeteve
pushed a commit
to gweeteve/hermes-agent
that referenced
this pull request
Jun 2, 2026
Egavasyug
pushed a commit
to Egavasyug/hermes-agent
that referenced
this pull request
Jun 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #21269
Problem
When the installer is run via
sudo -u <service-account>,uvresolves config file paths against the process owner's (root) home directory rather than the effective user's. This causes aPermission deniederror when trying to read/root/uv.toml:Root Cause
uvautomatically discovers config files (uv.toml,pyproject.toml) by walking up from$HOME. Undersudo -u,$HOMEis typically still/root(or inherited from the sudo caller), so uv tries to read root-owned files that the effective user can't access.Fix
Set
export UV_NO_CONFIG=1early in both install scripts. This prevents uv from discovering any config files during installation, which is the correct behavior for a bootstrap script that manages its own isolated environment.Files changed:
scripts/install.sh— main installer (used bycurl | bash)setup-hermes.sh— developer setup script (used aftergit clone)Both scripts already clear
PYTHONPATHandPYTHONHOMEto prevent env leakage;UV_NO_CONFIG=1follows the same pattern for uv's config discovery.Verification