Products › lamco-dbus-tools › Use cases
Rejected send message, 1 matched rules: AccessDenied on the D-Bus system bus
Rejected send message, 1 matched rules: Find which D-Bus policy rule denied a call on the system bus, and in which file, with dbussee and dbustell policy.
A call to a service on the system bus fails with AccessDenied, and the error counts the rules
that matched without naming one. The part people paste into a search box is this:
Rejected send message, 1 matched rules
lamco-dbus-tools found the cause with dbussee, whose ring kept the refusal with its call and caller, and
dbustell, whose policy named the rule that decided it and the file it's in.
A real run on 2026-11-30 on deb13-gnome (a test VM, Debian 13, dbus-daemon 1.16.2), with a development
build of lamco-dbus-tools, version 0.1.0. The service and its policy are made up for this page, not a real
application: backup-service.py and com.example.Backup.conf. run.sh installs them, runs
everything below and removes it all again; every output quoted is in the use case's directory.
The symptom
A backup service on the system bus answers its status to anyone, and refuses to start a backup:
$ gdbus call --system --dest com.example.Backup --object-path /com/example/Backup --method com.example.Backup.Status
('idle',)
$ gdbus call --system --dest com.example.Backup --object-path /com/example/Backup --method com.example.Backup.Start nightly
Error: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Rejected send message, 1 matched rules; type="method_call", sender=":1.123" (uid=1000 pid=2095 comm="gdbus call --system --dest com.example.Backup --ob") interface="com.example.Backup" member="Start" error name="(unset)" requested_reply="0" destination="com.example.Backup" (uid=0 pid=2059 comm="python3 backup-service.py")
The refusal came from the bus, not the service: The call never reached it. The bus says one rule matched, and not which one, nor in which file.
Caught as it happens
With the helper, dbussee-monitor, installed, a member of its group records the system bus. A ring keeps the last 60
seconds and writes them when the bus refuses something:
dbussee --bus system record --all --ring 60 --on-error=org.freedesktop.DBus.Error.AccessDenied --after 1 --duration 60 --out caught.json
$ dbustell errors caught.json
1 errors: 1 from the bus itself, 0 from services.
From the bus, about calls to services: Refused, not delivered, or not answered in time:
1 org.freedesktop.DBus.Error.AccessDenied, answering com.example.Backup com.example.Backup.Start
$ dbustell findings caught.json
CALL-004 (notice): The bus refused or couldn't deliver calls
The bus answered calls to services itself: 1 AccessDenied.
On a machine where refusals come from many programs, the ring is what ties each one to the call it answered and to the caller, with no one watching when it happens. dbus-daemon also logs it:
dbus-daemon[661]: [system] Rejected send message, 1 matched rules; type="method_call", sender=":1.126" (uid=1000 ...) interface="com.example.Backup" member="Start" ...
The log line, like the error, counts the matched rules without naming one.
The rule
An audit reads the policy as the bus reads it, and keeps each rule's file and line:
$ dbussee audit collect --no-score --out audit.json
NAME RUNS AS UNIT SCORE EVERY USER MAY ACTIONS
com.example.Backup - - - call 2 ifaces 0
$ dbustell policy audit.json --user "$USER" --call com.example.Backup com.example.Backup Start
dbus-daemon: denied, by /usr/share/dbus-1/system.conf:51 <deny send_type="method_call"/>
dbus-broker: denied, by /usr/share/dbus-1/system.conf:51 <deny send_type="method_call"/>
The service's file allows every user Status and nothing else of its interface, so the call falls
through to the system bus's own default: Every method call is denied unless something allows it. Asking
again as a member of the group the file names:
$ dbustell policy audit.json --user "$USER" --group backup-operators --call com.example.Backup com.example.Backup Start
dbus-daemon: allowed, by /etc/dbus-1/system.d/com.example.Backup.conf:13 <allow send_destination="com.example.Backup" send_interface="com.example.Backup"/>
dbus-broker: allowed, by /etc/dbus-1/system.d/com.example.Backup.conf:13 <allow send_destination="com.example.Backup" send_interface="com.example.Backup"/>
The fix
Nothing in the policy was wrong: The user wasn't in backup-operators. Added to it, in a new login
session:
$ gdbus call --system --dest com.example.Backup --object-path /com/example/Backup --method com.example.Backup.Start nightly
('started nightly',)
The answer came before the change was made: dbustell policy with --group asks the question for a
group the user isn't in yet.
What made it findable
- A denial by default names no rule in any file, so reading the service's own policy file doesn't show
why. The verdict names the rule that decided it, here the stock
system.conf. - The ring holds the refusal with its call and caller even when no one was watching.
- The audit's reading is the bus's, so the same question gets the same answer as the daemon, which the oracle cases hold it to.
The audit also notes, as POL-004, that the file's own rule would grant the names below
com.example.Backup on dbus-broker; that's beside this problem.