Fix systemd status=203/EXEC by reading the error at the end
status=203/EXEC means systemd could not exec the file. The error ending the journal line points to the path, permissions, shebang or a noexec mount.
Main PID: 47581 (code=exited, status=203/EXEC)203/EXEC means systemd could not even start the file in ExecStart= — the program never ran. The error at the end of the journal line (No such file or directory, Permission denied or Exec format error) narrows it to one of three groups, so read that first and check only the matching row below.
The systemd manual (systemd.exec, Process Exit Codes) defines 203 as: "The actual process execution failed (specifically, the execve(2) system call). Most likely this is caused by a missing or non-accessible executable file." There is no program log, and restarting gives the same result. The general routine (reading status, restart limits) is in Find out why a service is failed; this page only narrows down 203.
[1] Read the end of the failure line in the journal.
# journalctl -u myapp -b --no-pager -n 20In a line such as Failed to execute /srv/app/bin/myapp: No such file or directory, the part after the colon is the error returned by execve. The rest of this page uses only that part.
[2] Map the error to a cause. The table comes from calling execve directly inside an Ubuntu 24.04 container for each case. systemd uses the same system call to start a service.
| Error | Cases reproduced |
|---|---|
No such file or directory | file missing · shebang interpreter missing (#!/usr/bin/python4) · CR (\r, Windows line ending) after the shebang |
Permission denied | no execute bit (root is blocked too) · file on a noexec mount · the User= account cannot enter a parent directory |
Exec format error | script without a shebang |
## 1 missing fileexecve("/srv/app/bin/myapp") = -1: No such file or directory## 3 CRLF shebangexecve("/srv/app/bin/crlf.sh") = -1: No such file or directory## 4 no shebangexecve("/srv/app/bin/noshebang.sh") = -1: Exec format error## 6 noexec mountexecve("/mnt/noexec/run.sh") = -1: Permission denied[3] For No such file or directory, check the path and the first line.
# systemctl cat myapp | grep ^ExecStart# ls -l /srv/app/bin/myappIf the file exists, look at its first line as bytes. This is the CRLF script from the test:
# head -1 /srv/app/bin/crlf.sh | od -c | head -20000000 # ! / b i n / b a s h \r \n0000015A \r means the file was saved with Windows line endings. Keep the original with cp -a file file.bak; after sed -i 's/\r$//' file it ran at once in the same container. ExecStart= must be an absolute path or a bare name found in the standard directories such as /usr/bin; anything elsewhere needs an absolute path (systemd.service manual). List the standard directories with systemd-path search-binaries-default.
[4] For Permission denied, check the execute bit, then the parent directories, then the mount. namei -l shows the permissions of every directory on the path.
# namei -l /srv/private/run.shf: /srv/private/run.shdrwxr-xr-x root root /drwxr-xr-x root root srvdrwx------ root root private-rwxr-xr-x root root run.shCheck the mount options separately. If you do not know which mount holds the file, findmnt -no OPTIONS -T <file path> finds it. This is the noexec mount from the test:
# findmnt -no OPTIONS /mnt/noexecrw,nosuid,nodev,noexec,relatime,inode64The file is rwxr-xr-x, but private is drwx------, so the account in User= (nobody in the test) cannot enter it — and the error was still just Permission denied. Add o+x to the directory or move the file somewhere that account can reach. If findmnt shows noexec, nothing on that mount runs regardless of permissions; move the executable to another filesystem (changing mount options affects the whole filesystem).
[5] For Exec format error, add an interpreter line such as #!/bin/sh to the script, or put the interpreter in front: ExecStart=/bin/bash /srv/app/bin/run.sh. Whether a binary built for another CPU (arm64 on x86_64) gives the same error was not tested here.
[6] After the fix, reload the unit files, clear the failure record and start again.
# systemctl daemon-reload# systemctl reset-failed myapp# systemctl start myapp# systemctl status myapp --no-pagerWhen the Main PID: line no longer shows 203/EXEC and shows the program's own exit code or running, the exec step has passed. Any further failure is in the program's own log.
Analyze your syslog · journal log in the browser ↗ — nothing is uploaded.