Skip to content

Feature request: PUID/PGID support for container user mapping #5

@carl-jeffrolc

Description

@carl-jeffrolc

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions