From 943026658b0d7f5c750c1fbb6bb81c019da8096e Mon Sep 17 00:00:00 2001 From: Mischa Date: Fri, 19 Jun 2026 00:15:56 +0200 Subject: [PATCH] fix: make fix-perms idempotent and persistent across container restarts The getgrav/grav image is Debian-based and has no uid 1000 user, causing Apache to fail switching to APACHE_RUN_USER=#1000 on restart. fix-perms now creates the uid 1000 user if absent, sets ownership, then gracefully reloads Apache workers so they run as uid 1000. Co-Authored-By: Claude Sonnet 4.6 --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index f64dd6e..c53921c 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,9 @@ stop: setup: start install-plugins fix-perms fix-perms: + docker exec intotheeast_grav bash -c "getent passwd 1000 > /dev/null || useradd -u 1000 -M hostuser" docker exec intotheeast_grav chown -R 1000:1000 /var/www/html + docker exec intotheeast_grav apachectl graceful install-plugins: docker exec -w /var/www/html intotheeast_grav php bin/gpm install $(shell cat plugins.txt | tr '\n' ' ') -y