Sandbox Unblock
Paste a systemd unit and the error it logged. See the sandbox line that likely blocked it and get a drop-in that re-opens only that, keeping the rest of the hardening.
Output of systemctl cat <name>, every file it prints.
Output of journalctl -u <name> or systemctl status <name>, around the failure.
Ctrl + Enter diagnoses
You get the sandbox line that likely blocked the service, quoted from its file, and a drop-in that re-opens only that. If the log does not show enough, it says so instead of guessing.
How this works
The rules are fixed and checked against systemd.exec(5). A rule fires only when the log shows its error and the unit has the setting that causes it.
- Read-only file system:
EROFSon a path underProtectSystem=,ReadOnlyPaths=orInaccessiblePaths=. - Home directory hidden: A permission, not-found or read-only error under
/home,/rootor/run/userwithProtectHome=. - Namespace setup failed:
status=226/NAMESPACEwith a missing path that a path or bind setting names. - System call blocked:
status=31/SYSwithSystemCallFilter=set. - Executable memory denied: A segfault or failed executable
mmapwithMemoryDenyWriteExecute=yes. - Address family blocked:
EAFNOSUPPORTwithRestrictAddressFamilies=set. - Device hidden: A failed open under
/devwithPrivateDevices=yes. - Capability dropped:
status=218/CAPABILITIES, orOperation not permittednaming aCAP_*, withCapabilityBoundingSet=set.
DynamicUser=yes implies ProtectSystem=strict and ProtectHome=read-only. When one of those is the cause, the finding says so.
Worked examples
php-fpm[812]: PHP Warning: file_put_contents(/srv/app/cache/x.php): failed to open stream: Read-only file system in /srv/app/index.php on line 14
ProtectSystem=strict, set by a drop-in, blocks the cache write. One ReadWritePaths= line opens that folder.
systemd[4120]: dnscrypt-proxy.service: Failed to set up mount namespacing: /run/foo: No such file or directory
ReadWritePaths= names a folder that is missing. A "-" prefix lets the service start without it.
systemd[1]: usbguard.service: Main process exited, code=killed, status=31/SYS
The filter killed it but the log names no call. You get the line and how to find the call, no drop-in.
What it does
Distro packages now ship services with ProtectSystem=, PrivateDevices=, SystemCallFilter= and friends. When one of them blocks something the service needs, the log says Read-only file system or status=31/SYS and nothing about which line did it. This page reads the effective unit, drop-ins included, matches the log against a fixed set of rules and quotes the line it implicates. The drop-in it writes changes only that, so the rest of the sandbox stays on.
How to use it
- Run
systemctl cat <name>and paste everything it prints into Unit. - Run
journalctl -u <name> -n 50and paste the lines around the failure into Log. - Press Diagnose, read the quoted line, then save the drop-in and run the test commands.
What it does not do
- It only knows the eight rules listed above; SELinux, AppArmor, ProtectKernel*=, RestrictNamespaces= and similar are not checked.
- It does not generate units or timers, or score hardening.
- Nothing you paste is uploaded, saved or put in the address bar.
Questions
Why a drop-in and not editing the unit?
Package updates overwrite the unit file. A drop-in in /etc/systemd/system/<name>.service.d/ survives them and is one file to delete.
Why does it sometimes give no drop-in?
A seccomp kill rarely names the syscall, and an address-family error rarely names the family. Guessing would open more than needed, so it shows the line and, for a seccomp kill, the commands that find the missing name.
Does the drop-in turn the sandbox off?
No. It changes only what the finding names: usually one setting or one added entry. A list that has to be rewritten is cleared and written back in full.
Is my unit or log sent anywhere?
No. It is read in this page and gone when you close the tab.


