Connecting dbus to web app

Curtis Maloney cmaloney at cardgate.net
Mon May 25 16:04:46 PDT 2009


pete-c wrote:
> Hi, I was just wondering if there is any way to give permission to access
> dbus to www-data? I'm trying to connect a cgi web page to a dbus server that
> holds information given by a program running on my computer, but am stuck at
> the moment. Does anyone have any advice as to how to get round this problem?
> Many thanks,

I've been doing this for a few years now, however I've been using FastCGI 
and, more recently, mod_wsgi -- both of which allow your web app to run as a 
separate user to the web server.

Your options boil down to:
a) setting your cgi suid, so it runs as its owner, and assigning dbus 
permissions to it.
b) If you're using Apache, investigate using mod_suexec, and doing as above.
c) explicitly adding permissions for www-data to the services you need

-- 
Curtis Maloney
cmaloney at cardgate.net



More information about the dbus mailing list