node-dbus icon indicating copy to clipboard operation
node-dbus copied to clipboard

Error: Connection ":1.1162" is not allowed to own the service

Open blackxMan opened this issue 8 years ago • 3 comments

Hi every body, at first i thank all contributor on this project. so when i want to start new service i got this error Error: Connection ":1.1162" is not allowed to own the service "nodejs.dbus.PMTABounceManager" due to security policies in the configuration file

This is a portion of my code ` DBus = require('dbus');

process.env.DISPLAY = ':0';
process.env.DBUS_SESSION_BUS_ADDRESS = 'unix:path=/run/dbus/system_bus_socket';

var dbus = DBus.getBus('system');

// Create a new service, object and interface
var service = DBus.registerService('system', 'nodejs.dbus.PMTABounceManager');
var obj = service.createObject('/nodejs/dbus/PMTABounceManager');
var iface = obj.createInterface('nodejs.dbus.PMTABounceManager.PusherInterface');

`

blackxMan avatar Dec 01 '17 21:12 blackxMan

i fix that by adding security policy

blackxMan avatar Dec 01 '17 22:12 blackxMan

i fix that by adding security policy

What policies have you added?

space2pacman avatar Feb 29 '24 12:02 space2pacman

i fix that by adding security policy

What policies have you added?

  1. edit /usr/share/dbus-1/system.conf

add to policy

<policy context="default">
  <allow own="*"/>
</policy>
  1. reload config

dbus-send --print-reply --system --type=method_call --dest=org.freedesktop.DBus org.freedesktop.DBus.ReloadConfig

space2pacman avatar Feb 29 '24 16:02 space2pacman