• exec/load/door_deploy.js

    From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Sun Jul 26 22:57:46 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/03a61c1973e94fd92dd1fd8b
    Modified Files:
    exec/load/door_deploy.js
    Log Message:
    doors: deploy the binary with its execute permission

    file_copy() creates its destination with fopen(dest, "wb"), so the copy
    gets mode 0666 & ~umask -- 0644 under the usual 0022 -- and the source's permission bits are not carried across (GitLab #1202). A door binary
    therefore arrived non-executable and the BBS refused to launch it:

    !ERROR 13 (Permission denied) executing: /sbbs/xtrn/syncalert/syncalert

    Add the execute bits after each copy, and only where read permission is
    already granted, so a deliberately restricted install is never widened.
    A destination that can already be executed is left alone entirely, which
    keeps deploys onto a file owned by the BBS user -- or reached over a
    mount that forbids chmod -- from warning about a mode that is correct.
    Windows has no execute bit to lose and is skipped.

    This runs on the "already this build" path too: a binary deployed before
    this fix is byte-identical and still non-executable, and re-running the
    deploy is exactly what a sysop hitting the permission error will try.

    Only a first deploy was ever affected. Copying over an existing binary truncates it in place, so that file keeps the mode it already had, and
    any install where the door had been deployed once -- or whose live entry
    is a symlink into the build tree -- looked correct.

    Reported by nelgin, installing SyncAlert on a fresh system.

    Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net