Fix systemd status=233/RUNTIME_DIRECTORY
systemd status=233/RUNTIME_DIRECTORY means runtime directory setup failed. Trace the RuntimeDirectory= path and check for a file that blocks creation.
When you see status=233/RUNTIME_DIRECTORY, check the unit’s RuntimeDirectory= path. With RuntimeDirectory=gb-blocker/demo in a system unit, systemd prepares /run/gb-blocker/demo. If /run/gb-blocker is a regular file, systemd cannot create demo beneath it.
[1] The test unit set RuntimeDirectory=gb-blocker/demo and failed to start while /run/gb-blocker was a regular file. Check the process lines in its status and read the journal.
# systemctl status gb-runtime.service --no-pager --lines=0 Process: 106 ExecStart=/usr/bin/true (code=exited, status=233/RUNTIME_DIRECTORY) Main PID: 106 (code=exited, status=233/RUNTIME_DIRECTORY)# journalctl -u gb-runtime.service -b --no-pager -o catStarting gb-runtime.service - /usr/bin/true...gb-runtime.service: Failed to set up special execution directory in /run: Not a directorygb-runtime.service: Main process exited, code=exited, status=233/RUNTIME_DIRECTORYgb-runtime.service: Failed with result 'exit-code'.Failed to start gb-runtime.service - /usr/bin/true.On your system, replace myapp.service with the failed unit’s name.
$ sudo journalctl -b -u myapp.service --no-pager -n 40$ systemctl cat myapp.serviceThe v255 source includes the base path in the Failed to set up special execution directory in message. That base is /run for system units and $XDG_RUNTIME_DIR for user units. Append each relative name listed in RuntimeDirectory= under [Service] to that base. For a user unit, run journalctl --user -b -u myapp.service and systemctl --user cat myapp.service from that user’s session.
[2] For Not a directory, walk the path with namei -l and check each parent component for a regular file.
$ namei -l /run/gb-blocker/demoSystemd can create a missing final directory. For Read-only file system in the journal, check the mount containing the failing path first, for example with findmnt -T /run.
[3] Resolve the path conflict. Identify the process or deployment step that put a file there. Moving a file that another service uses affects that service. Decide which configuration owns the path before changing either one.
For your unit, resolve the conflict and let systemd create the directory. It applies the unit’s User=, Group= and RuntimeDirectoryMode= to the final directory. According to the manual, if an existing directory’s owner or group differs, systemd changes ownership recursively. Check ownership before pointing a unit at a directory shared with another service.
[4] Start the failed unit again and check the directory while it is running. If you edited the unit file, run sudo systemctl daemon-reload first.
$ sudo systemctl start myapp.service$ systemctl status myapp.service --no-pager$ namei -l /run/gb-blocker/demoUse the actual path from RuntimeDirectory= in the last command. By default, systemd removes the final directory when the unit stops. For a short-lived unit, check the journal and exit status as well. If the status reads status=200/CHDIR, check the path in WorkingDirectory=. Fix systemd status=200/CHDIR
If repeated failures hit the start-rate limit, clear the counter for the affected unit after resolving the conflict. Find why a systemd service failed
In the test, moving the blocking file and starting the same unit again gave ExecMainStatus=0 and created /run/gb-blocker/demo as a directory.
# mv -T /run/gb-blocker /run/gb-blocker.saved# systemctl start gb-runtime.service# systemctl show gb-runtime.service -p Result -p ExecMainStatus# stat -c '%F %a %U:%G %n' /run/gb-blocker/demoResult=successExecMainStatus=0directory 755 root:root /run/gb-blocker/demoAnalyze your syslog · journal log in the browser ↗ — nothing is uploaded.