mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-08-09 14:42:29 +02:00
fix(webtrees): chown persistent dirs to the uid the app actually runs as (#2941)
/docker-entrypoint.py renumbers www-data to PUID:PGID after cont-init has run, then re-chowns only its DATA_DIR. Chowning /config by name beforehand left /config/modules_v4 owned by the image's original www-data uid (33), so the running Apache/PHP process (uid 1000) could not create directories in it -- breaking custom module installation from the webtrees UI. Fixes #2940 Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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]"
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user