Normalize published file permissions during client deploy

This commit is contained in:
Jage9
2026-02-22 03:00:08 -05:00
parent 544dc929fd
commit f56d89e22e
2 changed files with 9 additions and 0 deletions

View File

@@ -57,6 +57,9 @@ Notes:
- Third arg is Vite base path for production assets.
- For `https://bestmidi.com/chgrid/`, use `/chgrid/`.
- For site root deploy (`https://bestmidi.com/`), use `/`.
- Deploy script normalizes publish permissions to avoid shared-host PHP soft exceptions:
- directories `755`
- files `644`
Shortcut (client deploy + service restart):

View File

@@ -28,5 +28,11 @@ if [[ -d "$PHP_PROXY_DIR" ]]; then
rsync -a "$PHP_PROXY_DIR/" "$PUBLISH_DIR/"
fi
# Normalize publish permissions for restrictive shared-host PHP handlers.
# - Directories must be executable/traversable.
# - PHP/static files must not be group-writable.
find "$PUBLISH_DIR" -type d -exec chmod 755 {} +
find "$PUBLISH_DIR" -type f -exec chmod 644 {} +
echo "client deploy complete: $PUBLISH_DIR"
echo "client base path: $BASE_PATH"