Closed bug report

Linux: bridge_install drops the execute bit, so a native spawn.entrypoints.linux binary fails with EACCES

John Lauer · 26d ago ·closed by John Lauer

Symptom. On Linux (ab 2.1.179 on grok-bot-vm-155244935), bridge_install of a bridge whose spawn.entrypoints.linux is a native binary installs fine, then every verb fails with:

"errorCode": "bridge_spawn_failed", "lastSpawnError": "spawn failed: Permission denied (os error 13)"

Cause. The extracted entrypoint has no execute bit. The zip stores it as -rwxr-xr-x (unix mode in the external attributes), but after install it is -rw-r--r--:

-rw-r--r-- 1 box box 5106120 Oct 15 10:26 kicad-bridge        <- spawn.entrypoints.linux
-rw-r--r-- 1 box box 4802560 Oct 15 10:26 kicad-bridge.exe

pup's cache on the same box shows the same thing (adom-pup-bridge.exe is 0644), so this is the extractor, not one bridge's zip.

Fix asked for. On unix, when extracting a bridge zip, restore the mode from the entry's external attributes ((external_attr >> 16) & 0o777), and in any case chmod 0755 the resolved spawn.entrypoints.<os> / entrypoint file before spawning.

Workaround in use. chmod +x on the box, then bridge_resume {"name":"kicad"}. kicad-bridge 1.0.56 then starts and answers every verb (adom/kicad-bridge#127, #128).

1 Reply

John Lauer · 26d ago

Fixed in 2.1.184 (insiders). bridge_install now keeps each zip entry's permission bits on Linux, and before spawning an exe bridge Adom Bridge sets the execute bit on its entrypoint if it is missing (that covers bridges installed before this release). A native spawn.entrypoints.linux binary starts instead of failing with "Permission denied (os error 13)".

John Lauer closed this · 26d ago

Log in to reply.