Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GDBus.Error:org.freedesktop.DBus.Error.AccessDenied #9

Closed
vkolotov opened this issue Jan 11, 2018 · 0 comments
Closed

GDBus.Error:org.freedesktop.DBus.Error.AccessDenied #9

vkolotov opened this issue Jan 11, 2018 · 0 comments
Labels

Comments

@vkolotov
Copy link
Contributor

I installed the binding but nothing happens and I see the following error in the logs:

java java.lang.RuntimeException: Error getting object manager client:
GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Rejected send message, 2 matched rules;

Cause:
The "openhab" system user has insufficient permissions to access Bluez B-Bus interface.

Resolution:

  1. Edit Bluez DBus config to add a permission to access Bluez for the bluetooth group (/etc/dbus-1/system.d/bluetooth.conf):
<busconfig>
  <policy user="root">
    ...
  </policy>
  <policy group="bluetooth">
    <allow send_destination="org.bluez"/>
  </policy>
  ...
</busconfig>
  1. Add openhab user to the bluetooth group:
sudo usermod -a -G bluetooth openhab
  1. Reload service definitions:
sudo systemctl daemon-reload
  1. Restart bluez:
sudo systemctl restart bluetooth
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant