FULL AI ANALYSIS

systemd service fails to start with status=203/EXEC for Node app after unit file change

Generated Nov 2, 2026, 9:26:30 AM

Analysis summary

status=203/EXEC indicates systemd could not execute the binary specified by ExecStart. Typical causes: missing executable, wrong permissions, bad interpreter shebang pointing to missing binary, or security policy denying exec.

Possible causes

ExecStart path not executable (missing +x) or file owned by wrong user/FS mount noexec.

75%

Shebang references /usr/bin/env but env missing or line endings are CRLF causing '/usr/bin/env: bad interpreter'.

60%

Unit file points to a wrapper that references relative paths not present under systemd PATH.

40%

AppArmor or SELinux profile preventing execution of that binary.

20%

Suggested fixes

1

Diagnostic step 1

Inspect unit status and journal: sudo systemctl daemon-reload; sudo systemctl start myapp.service; sudo systemctl status myapp.service -n 50; sudo journalctl -u myapp.service -n 200 --no-pager Result meaning: Journal lines commonly show the underlying exec failure. 'Permission denied' suggests file mode or mount options. 'No such file or directory' with valid path often indicates bad interpreter or CRLF line endings.

2

Diagnostic step 2

Check file permissions, ownership, and shebang: ls -l /usr/local/bin/start-myapp.sh; head -1 /usr/local/bin/start-myapp.sh | sed -n '1p' | od -c | sed -n '1p' Result meaning: If script lacks the executable bit, add it. If shebang contains CRLF (\r) bytes or references a non-existent interpreter, fix it. If file owned by root but unit expects different privileges, adjust as needed.

3

Diagnostic step 3

Try running the ExecStart as the target user manually: sudo -u appuser /usr/local/bin/start-myapp.sh Result meaning: If it runs interactively, the issue is systemd-specific (environment or security policies). If it fails with same error, the problem is the binary or interpreter.

4

Diagnostic step 4

Verify mount options and binary execution allowed: mount | grep "$(df --output=target /usr/local/bin | tail -1)" and check for 'noexec'. Also check for AppArmor denials in dmesg or audit logs. Result meaning: If filesystem mounted with noexec, systemd cannot execute the script; remounting or moving the file is needed. AppArmor denials will appear in dmesg/audit and require profile adjustments.

5

Diagnostic step 5

Validate PATH references inside script and absolute paths to node: which node; sudo -u appuser /usr/bin/node --version (or explicit /usr/bin/env node). Result meaning: If /usr/bin/env node is missing because node is in /usr/local/bin, adjust shebang or use an absolute path. If node binary exists but not in PATH for systemd, set Environment=PATH in the unit.