mirror of
https://github.com/safedep/pmg.git
synced 2026-08-03 07:24:09 +02:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user