endurain-project/endurain
11
124
Fork
You've already forked endurain
8

fix: include GID in start.sh logging and chown error messages #759

Merged
joaovitoriasilva merged 1 commit from fix/issue_758 into master 2026年07月05日 14:38:16 +02:00

What does this PR do?

Fixes start.sh error messages that suggested the wrong GID when the container runs with different UID and GID values (e.g. user: "99:100").

Initially reported at #753

The script only captured current_uid=$(id -u) but never current_gid=$(id -g), so the chown hint in permission-denied errors used $current_uid as both UID and GID — producing sudo chown -R 99:99 when it should be sudo chown -R 99:100.

Changes in docker/start.sh:

  1. Capture current_gid=$(id -g) alongside current_uid
  2. Log both at startup: "Container running as UID $current_uid, GID $current_gid"
  3. Include GID in permission-denied error context
  4. Use $current_uid:$current_gid in the chown hint

Feature freeze note

Bug fix — improves error messaging for a regression in the non-root container support.

Closes #758

Type of change

  • Bug fix

Checklist

  • This PR is focused on a single concern
  • An issue was opened and acknowledged before writing this code
  • If this PR introduces a new feature during freeze, it was discussed and explicitly acknowledged first
  • The PR is under ~300 lines changed
  • Tests have been added or updated where applicable
  • Documentation has been updated where applicable
  • Commit messages follow Conventional Commits format

Notes for the reviewer

The stat output on line 53 already includes the group (%g) of the mount point, so users had visibility into the host-side GID. The fix ensures the suggested chown command matches the actual container GID.

## What does this PR do? Fixes `start.sh` error messages that suggested the wrong GID when the container runs with different UID and GID values (e.g. `user: "99:100"`). Initially reported at #753 The script only captured `current_uid=$(id -u)` but never `current_gid=$(id -g)`, so the `chown` hint in permission-denied errors used `$current_uid` as both UID and GID — producing `sudo chown -R 99:99` when it should be `sudo chown -R 99:100`. Changes in `docker/start.sh`: 1. Capture `current_gid=$(id -g)` alongside `current_uid` 2. Log both at startup: `"Container running as UID $current_uid, GID $current_gid"` 3. Include GID in permission-denied error context 4. Use `$current_uid:$current_gid` in the `chown` hint ## Feature freeze note Bug fix — improves error messaging for a regression in the non-root container support. ## Related issue Closes #758 ## Type of change - [x] Bug fix ## Checklist - [x] This PR is focused on a single concern - [x] An issue was opened and acknowledged before writing this code - [x] If this PR introduces a new feature during freeze, it was discussed and explicitly acknowledged first - [x] The PR is under ~300 lines changed - [ ] Tests have been added or updated where applicable - [ ] Documentation has been updated where applicable - [x] Commit messages follow Conventional Commits format ## Notes for the reviewer The `stat` output on line 53 already includes the group (`%g`) of the mount point, so users had visibility into the host-side GID. The fix ensures the suggested `chown` command matches the actual container GID.
fix: include GID in start.sh logging and chown error messages #758
All checks were successful
Conventional Commits / validate (pull_request) Successful in 9s
ea0eb6095a
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
endurain-project/endurain!759
Reference in a new issue
endurain-project/endurain
No description provided.
Delete branch "fix/issue_758"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?