a-eye icon indicating copy to clipboard operation
a-eye copied to clipboard

Feature request: PUID/PGID support for container user mapping

Open carl-jeffrolc opened this issue 8 months ago • 1 comments

Feature Request

A-Eye's container runs as a hardcoded aeye user (UID 999, GID 999) via gosu. This causes permission issues when writing XMP sidecar files to photo directories that are owned by different users — common on Unraid where files are typically owned by nobody:users (99:100).

Current Behavior

  • Container creates aeye user (999:999) at build time
  • Entrypoint uses gosu aeye to drop privileges
  • No way to change the runtime UID/GID
  • --user flag conflicts with the gosu call in the entrypoint
  • --group-add doesn't propagate through gosu
  • Result: PermissionError: [Errno 13] Permission denied when writing XMP sidecars

Requested Behavior

Support PUID and PGID environment variables (standard pattern for Unraid/linuxserver.io containers) to set the runtime user at container startup.

Example:

environment:
  PUID: 99
  PGID: 100

Suggested Implementation

In entrypoint.sh, before the gosu call:

#!/bin/sh
PUID=${PUID:-999}
PGID=${PGID:-999}

# Update aeye user/group to match requested IDs
groupmod -o -g "$PGID" aeye 2>/dev/null
usermod -o -u "$PUID" aeye 2>/dev/null

# Fix ownership of data directory
chown -R aeye:aeye /app/data 2>/dev/null || true

exec gosu aeye "$@"

Workaround

Currently requires manually running docker exec a-eye usermod -aG users aeye and restarting after every container recreation.

Environment

  • Unraid with photos owned by nobody:users (99:100)
  • A-Eye pointed at Immich photo library
  • XMP sidecar writing enabled

carl-jeffrolc avatar Apr 02 '26 18:04 carl-jeffrolc

Thanks for the feature request This is now done and in the latest build. The container now defaults to PUID 99 and PGID 100 which matches Unraid's nobody:users, so it should just work out of the box. sidecar files will write to your photos directory without permission errors. Just update the container and you're good to go the new defaults apply automatically even without updating the template. If you want to see the PUID and PGID fields in dockertab or to set custom values, you can remove and reinstall from the updated template in CA, but just updating the container is all you should need.

SpaceinvaderOne avatar Apr 05 '26 08:04 SpaceinvaderOne