Problem with /usr/local/share featuring in system-bus .services search path
Submitted by Tom Crane
Assigned to D-Bus Maintainers
The following was originally reported to the dbus mailing list. See thread at http://lists.freedesktop.org/archives/dbus/2015-December/016839.html
Dear All, I am attempting to remove /usr/local/share from the list of paths dbus-daemon will search for system bus .service files in, but without success.
According to dbus-1.6.12/doc/dbus-specification.html from the dbus source package,
"On Unix systems, the system bus should default to searching for .service files in /usr/local/share/dbus-1/system-services, /usr/share/dbus-1/system-services and /lib/dbus-1/system-services, with that order of precedence. It may also search other implementation-specific locations, but should not vary these locations based on environment variables. ^"
I tried the following edit, (unified diff follows),
--- etc/dbus-1/system.conf.orig 2015-03-05 22:59:28.000000000 +0000 +++ etc/dbus-1/system.conf 2015-12-18 19:22:48.000000000 +0000 @@ -20,8 +20,10 @@
but that resulted in dbus-daemon failing to start with the following diagnostic (from journalctl)
dbus-daemon: Failed to start message bus: No text content expected inside XML element standard_system_servicedirs in configuration file
My motivation is to deal with this problem (diagnostic from journalctl), produced with the default configuration,
dbus-daemon: Cannot setup inotify for '/usr/local/share/dbus-1/system-services'; error 'Permission denied'
which occurs because /usr/local is the mountpoint for a remote mount on my systems -- something I don't want to have to change.
Many thanks Tom Crane
System details: OS: CentOS Linux release 7.1.1503 (Core) [CERN variant] DBUS: dbus-1.6.12-11.el7.x86_64 SYSTEMD: systemd-208-20.el7_1.6.x86_64
Additional notes: On my systems the mount under /usr/local is, and needs to be read-only.