Restore chmod 644 on tmp zip so kiosk user can read it for unzip

Accidentally dropped this line when rewriting the extraction block.
mktemp creates the file as root:root 600, so sudo -u kiosk unzip
gets 'Permission denied' trying to open the zipfile.

https://claude.ai/code/session_01VQ13Fwq4MXxwThLfCXBeGr
This commit is contained in:
Claude
2026-06-16 17:25:36 +00:00
parent 43266a4cf0
commit 56e3d17459
+1
View File
@@ -11099,6 +11099,7 @@ install_electron_binary() {
tmp_zip=$(mktemp --suffix=.zip) tmp_zip=$(mktemp --suffix=.zip)
if wget --timeout=300 --tries=3 --show-progress -O "$tmp_zip" "$electron_url" 2>&1; then if wget --timeout=300 --tries=3 --show-progress -O "$tmp_zip" "$electron_url" 2>&1; then
command -v unzip >/dev/null 2>&1 || sudo apt install -y unzip command -v unzip >/dev/null 2>&1 || sudo apt install -y unzip
chmod 644 "$tmp_zip" # mktemp creates root:root 600; kiosk user needs read access
# Fix ownership first so the kiosk user can write into the directory # Fix ownership first so the kiosk user can write into the directory
# (npm postinstall with --unsafe-perm can leave dist/ owned by root) # (npm postinstall with --unsafe-perm can leave dist/ owned by root)
sudo chown -R "$KIOSK_USER:$KIOSK_USER" "$KIOSK_DIR/node_modules/electron/" 2>/dev/null || true sudo chown -R "$KIOSK_USER:$KIOSK_USER" "$KIOSK_DIR/node_modules/electron/" 2>/dev/null || true