diff --git a/webtrees/CHANGELOG.md b/webtrees/CHANGELOG.md index e2ea80b00b..428b21cdda 100644 --- a/webtrees/CHANGELOG.md +++ b/webtrees/CHANGELOG.md @@ -1,4 +1,7 @@ +## 2.2.6.1 (2026-08-05) +- Fix custom modules failing to install from the webtrees UI (e.g. with the Custom Module Manager plugin) : /config/modules_v4 was left owned by the base image's original www-data uid (33) while the app runs as PUID:PGID, so it was not writable (https://github.com/alexbelgium/hassio-addons/issues/2940) + ## 2.2.6 (2026-05-09) - Update to latest version from nathanvaughn/webtrees-docker (changelog : https://github.com/nathanvaughn/webtrees-docker/releases) diff --git a/webtrees/config.yaml b/webtrees/config.yaml index 7a347f6793..8cfcf1b5cf 100644 --- a/webtrees/config.yaml +++ b/webtrees/config.yaml @@ -117,5 +117,5 @@ services: slug: webtrees udev: true url: https://github.com/alexbelgium/hassio-addons -version: "2.2.6" +version: "2.2.6.1" webui: "[PROTO:ssl]://[HOST]:[PORT:80]" diff --git a/webtrees/rootfs/etc/cont-init.d/99-run.sh b/webtrees/rootfs/etc/cont-init.d/99-run.sh index 27b8062cfe..e4f55dd621 100755 --- a/webtrees/rootfs/etc/cont-init.d/99-run.sh +++ b/webtrees/rootfs/etc/cont-init.d/99-run.sh @@ -56,10 +56,15 @@ rm -r /var2/www/webtrees/modules_v4 ln -sf "/config/modules_v4" /var2/www/webtrees/modules_v4 # Update permissions on target directories +# /docker-entrypoint.py renumbers www-data to PUID:PGID (usermod/groupmod) after this +# script has run, and then only re-chowns its DATA_DIR. Chowning by name here would +# therefore leave everything else -- notably /config/modules_v4 -- owned by the image's +# original www-data uid (33), which the running Apache/PHP process can no longer write to. +# Chown by the numeric ids the app will actually run as instead. echo "... update permissions" -chown -R www-data:www-data "$DATA_LOCATION" +chown -R "${PUID:-1000}:${PGID:-1000}" "$DATA_LOCATION" chmod -R 755 "$DATA_LOCATION" -chown -R www-data:www-data "/config" +chown -R "${PUID:-1000}:${PGID:-1000}" "/config" chmod -R 755 "/config" # Remove /data/data