From 99fdc4ac3a7c86ae879419498d160870b10932f8 Mon Sep 17 00:00:00 2001 From: Anthony Ettinger Date: Mon, 19 Oct 2026 13:26:54 +0000 Subject: [PATCH] moshpit-host.sh: leave the webroot readable by nginx On dev3 root's umask is 027, so setup-origin's placeholder index.html came out 0640 and the first visit was a 403. Co-Authored-By: Claude Opus 5.5 --- scripts/moshpit-host.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/moshpit-host.sh b/scripts/moshpit-host.sh index ee375e7..e23a194 100755 --- a/scripts/moshpit-host.sh +++ b/scripts/moshpit-host.sh @@ -110,8 +110,10 @@ install -d -o "$USER_NAME" -g "$USER_NAME" "$HOME_DIR/apps" "$SITE" "$SITE/publi sh "$SETUP" "$NAME" --webroot "$SITE/public" --api-key "$MOSHPIT_API_KEY" --target "$TARGET" -# setup-origin.sh writes a placeholder index.html as root; the folder is the customer's. +# setup-origin.sh writes a placeholder index.html as root (and root's umask may be 027); the folder +# is the customer's, and nginx reads it as another user. chown -R "$USER_NAME:$USER_NAME" "$SITE" +chmod -R u+rwX,go+rX "$SITE/public" cat <