abraunegg-onedrive/contrib
abraunegg 20e70cd062
Fix Bug #3601: Fix Docker entrypoint handling for non-root --user execution (#3602)
* Fix Docker entrypoint handling for non-root --user execution

This change updates the Docker entrypoint.sh to correctly support containers started with a numeric UID/GID via --user or user: (Docker Compose).

Previously, the entrypoint unconditionally attempted user and group management (useradd, groupadd, usermod) before checking whether the container was running as root. When the container was started as a non-root user, this resulted in immediate startup failures due to insufficient privileges.

The updated logic now:

* Detects whether the container is started as root or non-root
* Skips all user/group creation and ownership changes when running as non-root
* Treats --user / user: as authoritative when provided
* Preserves existing behaviour when the container is started as root (including optional privilege drop via gosu)
* Ensures ONEDRIVE_RUNAS_ROOT is only honoured when the container is actually running as root

This makes the container compatible with:

* Numeric UID/GID execution
* NFS-backed volumes where the user does not exist on the host
* Read-only bind mounts for upload-only scenarios

No changes are made to the OneDrive client itself; this update strictly improves container startup behaviour and correctness.
2026-01-11 07:12:58 +11:00
..
completions Update remaining completion files (#3197) 2025-04-04 06:12:23 +11:00
docker Fix Bug #3601: Fix Docker entrypoint handling for non-root --user execution (#3602) 2026-01-11 07:12:58 +11:00
images Implement Desktop Manager Integration for GNOME and KDE (#3500) 2025-11-03 14:26:49 +11:00
init.d Fix Codacy issues (#881) 2020-04-22 13:23:15 +10:00
logrotate Rework directory layout and refactor MD files for readability (#523) 2019-06-11 18:40:05 +10:00
pacman OneDrive Client for Linux v2.5.0 (#2805) 2024-09-16 11:14:46 +10:00
spec Release files for 2.5.9 (#3517) 2025-11-06 11:00:35 +11:00
systemd Fix Bug #3337: Fix issue with ExecStartPre statement to be more OS independent (#3348) 2025-06-18 20:53:56 +10:00