Fix systemd Failed to start service: status 203/EXEC

Beginner 15 min Nov 25, 2026
Ubuntu 24.04 Ubuntu 22.04 Debian 12 Debian 11 AlmaLinux 9 Rocky Linux 9 Fedora 41

Learn what the systemd status 203/EXEC error means and how to fix it by checking the ExecStart path, permissions, shebang lines and SELinux context. Includes practical journalctl and systemctl commands for Ubuntu, Debian, AlmaLinux and Rocky.

Prerequisites

  • Root or sudo access to the server
  • A systemd unit file that is failing to start
  • Basic familiarity with the command line

What this solves

When a systemd service fails with status 203/EXEC, systemd was unable to execute the binary or script defined in your unit file. This is almost always caused by a wrong path, missing execute permission, a bad shebang line, or an SELinux context blocking execution.

This tutorial walks through diagnosing the exact cause with journalctl and systemctl, then applying the correct fix without resorting to unsafe permission changes.

Understanding the 203/EXEC exit code

systemd exit codes follow a standard convention. Codes in the 200 range mean systemd could not even start the process, as opposed to the process starting and then crashing (which would show a different exit code).

Exit codeMeaning
203/EXECsystemd could not execute the command in ExecStart. The file is missing, not executable, or the interpreter failed
200/CHDIRThe WorkingDirectory specified does not exist
126Command found but not executable (shell-level equivalent)
127Command not found (shell-level equivalent)

203/EXEC specifically means the kernel's execve() call failed when systemd tried to launch your process. The four most common root causes are a typo in the binary path, a missing execute bit, a missing or broken shebang line in a script, or an SELinux policy denial.

Step-by-step diagnosis and fix

Check the failed service status

Start by looking at the immediate error systemd reports. This confirms you are dealing with 203/EXEC and not a different failure mode.

sudo systemctl status myapp.service

You should see output similar to this in the status block.

Process: 48213 ExecStart=/opt/myapp/start.sh (code=exited, status=203/EXEC)

Read the full unit file

Use systemctl cat to see the exact unit file systemd is actually using, including any drop-in overrides in /etc/systemd/system/myapp.service.d/. This avoids editing the wrong file.

sudo systemctl cat myapp.service

Pay close attention to the ExecStart line, the User directive, and WorkingDirectory. A typo in any of these can trigger 203/EXEC.

Check detailed logs with journalctl

journalctl -xe gives extended context around the failure, including kernel-level denial messages that systemctl status truncates.

sudo journalctl -xe -u myapp.service

For a focused view of just the last failed attempt, use the boot-relative flag.

sudo journalctl -u myapp.service --since "10 minutes ago" --no-pager
Note: If you see Permission denied alongside 203/EXEC on AlmaLinux or Rocky, suspect SELinux before anything else. Continue to the SELinux step below.

Verify the ExecStart path actually exists

A very common cause is a path that is slightly wrong, for example a typo, a relative path where systemd needs an absolute one, or a binary that was moved or never installed in the expected location.

sudo systemctl cat myapp.service | grep ExecStart

Take the path from ExecStart and confirm it exists on disk.

ls -l /opt/myapp/start.sh

If the file does not exist at that exact path, fix the ExecStart line in the unit file to point to the correct absolute path. systemd does not search your shell's PATH, so relative commands like start.sh without a full path will fail.

[Unit]
Description=My application
After=network.target

[Service]
Type=simple
User=myapp
WorkingDirectory=/opt/myapp
ExecStart=/opt/myapp/start.sh
Restart=on-failure

[Install]
WantedBy=multi-user.target

Fix the execute bit with chmod

Linux file permissions are split into three groups: owner, group, and others, each with read (r), write (w) and execute (x) permissions. A script without the execute bit set cannot be run directly, even if the content is a valid shell script.

Check the current permissions first.

ls -l /opt/myapp/start.sh

If the output looks like -rw-r--r--, the execute bit is missing for everyone, including the owner. Add execute permission for the owner and group that need to run it.

sudo chmod 750 /opt/myapp/start.sh

750 means the owner gets read, write and execute (7), the group gets read and execute (5), and others get nothing (0). This is appropriate for an application script that only the service account and its group need to run.

Never use chmod 777. It gives every user on the system full read, write and execute access to your files. Instead, fix ownership with chown and grant only the minimal permissions the service account actually needs.

If the service runs as a dedicated application user, make sure that user actually owns the file or has group access.

sudo chown myapp:myapp /opt/myapp/start.sh

For deeper background on the permission model, see configure Linux file and directory ownership with chown and security best practices.

Check for a missing or broken shebang line

If ExecStart points to a script (not a compiled binary), the first line must be a valid shebang telling the kernel which interpreter to use. A missing shebang, a typo in the interpreter path, or Windows-style line endings (CRLF) will all cause 203/EXEC.

head -n 1 /opt/myapp/start.sh

A correct shebang for a bash script looks like this at the very top of the file.

#!/bin/bash
cd /opt/myapp
exec /usr/bin/python3 app.py

Confirm the interpreter actually exists at that path.

which bash
which python3

If the script was edited on Windows, strip carriage returns that break the shebang line.

sudo sed -i 's/\r$//' /opt/myapp/start.sh

Diagnose SELinux context issues on AlmaLinux and Rocky

On RHEL-based systems, SELinux can block execution even when standard Unix permissions are correct. This is the most common 203/EXEC cause after a file was copied from another location or restored from a backup, since it may carry the wrong SELinux label.

sudo ausearch -m avc -ts recent

Look for a denied message referencing your binary path and an execute permission. If you see one, the file has an incorrect SELinux context rather than a permissions problem.

ls -lZ /opt/myapp/start.sh

Compare the context shown against what is expected for executables in that location, then restore the correct default context.

sudo restorecon -v /opt/myapp/start.sh

If the application lives in a non-standard directory, define a persistent file context rule instead of repeatedly running restorecon after every deployment.

sudo semanage fcontext -a -t bin_t "/opt/myapp/start.sh"
sudo restorecon -v /opt/myapp/start.sh
Do not disable SELinux with setenforce 0 to work around this. Fix the context with restorecon or semanage so the security policy stays enforced. For a deeper walkthrough, see configure SELinux mandatory access controls for enhanced security.

Reload systemd and restart the service

After editing the unit file, fixing permissions, or restoring the SELinux context, systemd needs to reload its configuration cache before the fix takes effect.

sudo systemctl daemon-reload
sudo systemctl restart myapp.service

daemon-reload is only required when the unit file itself changed. It is harmless to run it anyway whenever you are troubleshooting, since it has no effect on running services.

Verify your setup

Confirm the service is active and check the most recent log entries to ensure it stayed running rather than failing silently again.

sudo systemctl status myapp.service
sudo journalctl -u myapp.service -n 30 --no-pager

A healthy result shows Active: active (running) with no repeated restart attempts in the log. If you manage several services on the same host, cross-check with a full service list.

systemctl list-units --type=service --state=failed

For general service management commands beyond this fix, see check and manage running services on Linux with systemctl.

Common issues

SymptomCauseFix
status=203/EXEC immediately on startExecStart path is wrong or relativeUse an absolute path and confirm the file exists with ls -l
Script runs fine manually but fails under systemdMissing execute bit on the scriptsudo chmod 750 /path/to/script.sh plus correct ownership with chown
203/EXEC only after restoring from backup on AlmaLinuxWrong SELinux context on the restored filesudo restorecon -v /path/to/file
Shebang line looks correct but still failsWindows line endings (CRLF) in the scriptsudo sed -i 's/\r$//' /path/to/script.sh
Interpreter not found error in logsShebang points to a path that does not exist on this systemRun which bash or which python3 and update the shebang line
Works as root but fails under systemd's configured UserService account lacks execute permission or directory traversal rightsGrant group execute with chmod and verify parent directories are at least 711

Next steps

Running this in production?

Want this handled for you? This works for a single server. When you run multiple environments or need this available 24/7, keeping it healthy is a different job. See how we run infrastructure like this for European teams.
#systemd #journalctl #troubleshooting #selinux #linux permissions #exit codes

Don't want to manage this yourself?

We handle infrastructure for businesses that depend on uptime. Fully managed, with one fixed contact who knows your setup.

You get one fixed contact who knows your setup

At their desk in Rotterdam 11:08 · reachable in a message, no ticket form

Learn more: managed cloud infrastructure