Repository navigation
Let the container image run as a non-root UID - #77
Merged
Merged
Conversation
A UID without a passwd entry gets HOME=/ from Docker and Kubernetes, so mcli tried to create /.mc and every command failed with "mkdir /.mc: permission denied", even one that only uses MC_HOST_*. Pre-create /.mc with mode 1777. Root keeps /root/.mc, so existing mounts are unaffected, and --config-dir / MC_CONFIG_DIR still take precedence. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Feng Ruohang <rh@vonng.com>
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.
Contribution Licensing (no CLA, inbound=outbound, DCO required)
This pull request contributes to PGSTY SILO mcli (
pgsty/mc). Code contributionsare accepted under AGPL-3.0-or-later, the same license as the client.
This project does not use a CLA or require a separate Apache-2.0 license grant.
By submitting this pull request I represent that I have the right to contribute
the code changes under this repository's
GNU AGPL v3.0 or later
and retain copyright in my original work. Existing copyright and license
notices remain intact; separately licensed material keeps its applicable terms.
Every commit must carry a DCO
Signed-off-bytrailer (
git commit -s) certifying theDeveloper Certificate of Origin —
see CONTRIBUTING.md.
Description
Dockerfile.goreleasernow pre-creates/.mcwith mode 1777.Motivation and Context
A UID with no passwd entry gets
HOME=/from Docker and Kubernetes, so the image's mcli tried to create/.mc. Every command then failed withmkdir /.mc: permission denied, even one that only usesMC_HOST_*. That broke--userandrunAsNonRootunlessMC_CONFIG_DIRwas set.How to test this PR?
Built locally (linux/arm64) from the
RELEASE.2026-10-26T00-00-00Zbinary:--user 10001:10001: anMC_HOST_*command reaches the network, andalias importfollowed byalias listworks.-v dir:/root/.mc: the alias is written to the mounted directory.MC_CONFIG_DIRstill fails.--read-onlywithMC_CONFIG_DIRpointing at a tmpfs works.Types of changes
Checklist:
git commit -s) per the DCOcommit-idorPR #here)🤖 Generated with Claude Code