Fix systemd status=203/EXEC on Raspberry Pi¶
When a Raspberry Pi service reports status=203/EXEC, systemd tried to run a program and Linux could not launch it. Start with the executable named in ExecStart=. Check the path, the service account's permissions, and, for scripts launched directly, the interpreter on the first line. systemd execution exit codes
Find which command failed¶
Replace my-app.service with the failed unit. Read the first failure in the journal before looking at later restart messages.
For a unit managed by your user session, use systemctl --user and journalctl --user. If you edited a unit file directly and the loaded command still shows the old path, run sudo systemctl daemon-reload for a system unit, or systemctl --user daemon-reload for a user unit.
| What the log shows | What to check first |
|---|---|
No such file or directory during the EXEC step |
The executable path and any symlink target. For a directly launched script, also check the interpreter on its first line. |
Permission denied during the EXEC step |
The executable bit, directory traversal permissions for the service account, and whether the filesystem uses noexec. |
Python reports can't open file or ModuleNotFoundError |
Python launched successfully. Check the script argument or the packages installed in the service's Python environment. |
Check the executable path and permissions¶
For ExecStart=/home/alex/my-app/.venv/bin/python -u /home/alex/my-app/app.py, the executable is .venv/bin/python. Check that file first, including any interpreter symlink. Replace the path and account name below with yours.
If everything looks executable and the journal still says Permission denied, check the mount with findmnt -T "$exe" -o TARGET,OPTIONS. A mount with noexec blocks direct execution there. If the service uses settings such as ProtectHome=, inspect the unit and any overrides with systemctl cat "$unit" because its view of the path can differ from your shell's. Linux execve errors · systemd execution settings
If the path is wrong, use systemctl cat "$unit" to find the unit file and any overrides, then correct ExecStart= in your service configuration. If the virtual environment was moved or deleted, recreate it at the intended path and reinstall the project dependencies. Python virtual environments on Raspberry Pi
Check the first line of a directly launched script¶
When ExecStart= points directly to a shell script, the first line should name an available interpreter, for example #!/bin/sh. The script itself needs execute permission. Check its first line with:
#!/bin/sh\r$ shows a carriage return at the end of the line. Save the script with Unix LF line endings and check the first line again. If the script is yours and its execute bit is missing, run chmod u+x /home/alex/my-app/start.sh. For a Python script passed as an argument to Python, the interpreter needs execute permission and the script needs read permission. Linux interpreter scripts
Verify the repair¶
After fixing the file, restart just this service. If you edited the unit file directly, reload the manager first. Check the status and look for the output you expect from the application. For a user unit, use the user-manager commands without sudo.
If the result is start-limit-hit, fix the original error and run sudo systemctl reset-failed "$unit" before retrying. If you are still setting up the service, use the full example unit and startup checks. Run a Python script at boot
On a Pi 4B running Trixie with systemd 257, a missing executable, a shell script without execute permission, and a script with CRLF line endings each produced exit status 203. The last two started successfully after setting the execute bit and converting the line endings, respectively. When the Python interpreter launched successfully, a missing import returned 1 and a nonexistent script path returned 2.