Docker-Webstack icon indicating copy to clipboard operation
Docker-Webstack copied to clipboard

Issue: UID/GID Changes Due to New klogd User in Alpine Base Image

Open maxvisser opened this issue 8 months ago • 0 comments

The Alpine base image recently added a new user called klogd. As a result, both the php and nginx users were assigned new UID/GIDs, causing inconsistencies.


Before the klogd user was added: Image

After the klogd user was added: Image


Since we rely on an NFS share, which requires consistent user IDs, the file permissions broke after this change.

Suggested Solution: To ensure this issue doesn't happen again, we can manually set the UID/GID for the php and nginx users to higher values like so:

    addgroup -S -g 1001 php \
    && adduser -S -u 1001 -G php php \
    && usermod -u 1000 nginx \
    && groupmod -g 1000 nginx

This will ensure consistent user IDs for both php and nginx, even if new users are added in the base image

maxvisser avatar Aug 07 '25 12:08 maxvisser