ci: normalize /usr/local/bin perms before system-install e2e

The GitHub ubuntu-latest runner ships /usr/local/bin world-writable so
tooling can install without sudo. System install correctly refuses a
world-writable dir for the shared binary (any local user could replace
it and hijack every user's npm/pip). No FHS-compliant distro or Docker
image ships it world-writable — it is always root:root 0755 or
root:staff 2775 — so this normalizes only the anomalous CI runner back
to standard perms and still exercises the real /usr/local/bin path.
This commit is contained in:
Sahilb315
2026-07-14 01:14:10 +05:30
parent 1276a1ebaa
commit 1b17eb295a
+6
View File
@@ -929,6 +929,12 @@ jobs:
- name: Install PMG system-wide
run: |
# GitHub runners ship /usr/local/bin world-writable; system install
# (correctly) requires a root-owned, non-world-writable dir for the
# shared binary. Normalize to the standard production perms first.
ls -ld /usr/local/bin
sudo chown root:root /usr/local/bin
sudo chmod 755 /usr/local/bin
sudo install -m 755 bin/pmg /usr/local/bin/pmg
sudo pmg setup install --system