Bug 1704920 - dbus-broker fails to start: launcher_load_service_dir @ ../src/launch/launcher.c +753: Permission denied
Summary: dbus-broker fails to start: launcher_load_service_dir @ ../src/launch/launche...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dbus-broker
Version: 30
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Tom Gundersen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-04-30 19:29 UTC by Arjun A.K.
Modified: 2019-05-06 00:45 UTC (History)
14 users (show)

Fixed In Version: dbus-broker-21-2.fc30
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-06 00:45:35 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Arjun A.K. 2019-04-30 19:29:41 UTC
Just upgraded from F29 to F30, dbus-broker is not starting up

Starting D-Bus User Message Bus...
May 01 00:52:55 desktop dbus-broker-launch[1814]: ERROR launcher_load_service_dir @ ../src/launch/launcher.c +753: Permission denied
May 01 00:52:55 desktop dbus-broker-launch[1814]:       launcher_load_standard_session_services @ ../src/launch/launcher.c +905
May 01 00:52:55 desktop dbus-broker-launch[1814]:       launcher_load_services @ ../src/launch/launcher.c +961
May 01 00:52:55 desktop dbus-broker-launch[1814]:       launcher_run @ ../src/launch/launcher.c +1301
May 01 00:52:55 desktop dbus-broker-launch[1814]:       run @ ../src/launch/main.c +153
May 01 00:52:55 desktop dbus-broker-launch[1814]:       main @ ../src/launch/main.c +181
May 01 00:52:55 desktop dbus-broker-launch[1814]: Exiting due to fatal error: -13

Comment 1 David Rheinsberg 2019-05-01 09:27:27 UTC
One of your session-configuration-directories cannot be read by dbus-broker. I assume it has the wrong permissions. The standardized D-Bus configuration directories are:

 - $XDG_RUNTIME_DIR/dbus-1/services/
 - $XDG_DATA_HOME/dbus-1/services/
 - $HOME/.local/share/dbus-1/services/
 - $XDG_DATA_DIRS (append ./dbus-1/services to each)
 - /usr/local/share/dbus-1/services
 - /usr/share/dbus-1/services

If a variable is not set, the directories are skipped.

Each of these directories, if it exists, must be readable+executable by dbus-broker.

Comment 2 Arjun A.K. 2019-05-01 14:27:26 UTC
The permission of /usr/share/dbus-1/services directory are as follows

drwxr-xr-x. 2 root root 4.0K Apr  9 21:44 services/

Should i chmod it to dbus:dbus?

Comment 3 David Rheinsberg 2019-05-01 15:09:14 UTC
(In reply to Arjun A.K. from comment #2)
> The permission of /usr/share/dbus-1/services directory are as follows
> 
> drwxr-xr-x. 2 root root 4.0K Apr  9 21:44 services/
> 
> Should i chmod it to dbus:dbus?

No. This is fine. What about the other directories I listed?

Comment 4 Arjun A.K. 2019-05-02 14:38:54 UTC
# find / -name 'dbus-1' -type d | xargs -I '%' bash -c 'test -e %/services && echo % && ls -lh %'
/usr/share/dbus-1
total 44K
drwxr-xr-x. 2 root root 4.0K Apr 30 23:22 accessibility-services
drwxr-xr-x. 2 root root  12K Apr  9 21:44 interfaces
drwxr-xr-x. 2 root root 4.0K Apr  9 21:44 services
-rw-r--r--. 1 root root 3.5K Apr  9 21:43 session.conf
drwxr-xr-x. 2 root root 4.0K Apr  9 21:44 session.d
-rw-r--r--. 1 root root 5.6K Apr  9 21:43 system.conf
drwxr-xr-x. 2 root root 4.0K Apr  9 21:44 system.d
drwxr-xr-x. 2 root root 4.0K Apr  9 21:44 system-services
/usr/local/share/dbus-1
total 8.0K
drwx------. 2 root root 4.0K Sep 26  2018 interfaces
drwx------. 2 root root 4.0K Sep 26  2018 services


I tried chmod 755 on both interfaces and services directories (even though they are empty) still doesn't work.

Comment 5 David Rheinsberg 2019-05-02 15:43:03 UTC
(In reply to Arjun A.K. from comment #4)
> # find / -name 'dbus-1' -type d | xargs -I '%' bash -c 'test -e %/services
> && echo % && ls -lh %'
> /usr/share/dbus-1
> total 44K
> drwxr-xr-x. 2 root root 4.0K Apr 30 23:22 accessibility-services
> drwxr-xr-x. 2 root root  12K Apr  9 21:44 interfaces
> drwxr-xr-x. 2 root root 4.0K Apr  9 21:44 services
> -rw-r--r--. 1 root root 3.5K Apr  9 21:43 session.conf
> drwxr-xr-x. 2 root root 4.0K Apr  9 21:44 session.d
> -rw-r--r--. 1 root root 5.6K Apr  9 21:43 system.conf
> drwxr-xr-x. 2 root root 4.0K Apr  9 21:44 system.d
> drwxr-xr-x. 2 root root 4.0K Apr  9 21:44 system-services
> /usr/local/share/dbus-1
> total 8.0K
> drwx------. 2 root root 4.0K Sep 26  2018 interfaces
> drwx------. 2 root root 4.0K Sep 26  2018 services
> 
> 
> I tried chmod 755 on both interfaces and services directories (even though
> they are empty) still doesn't work.

All the directories I listed must be accessible as a normal user. The session-bus or user-bus runs under your user-ID. Only the **system-bus** runs as `dbus:dbus`. So this means `ls $DIR` must work as your normal user.

In your case, both the `interfaces` and `services` directories need `755`. Furthermore, I suspect their parent directories have wrong permissions as well. So `/usr/local`, `/usr/local/share`, `/usr/local/share/dbus-1` all need `755` as well. Note that you can safely remove these directories in case they are empty.

I now pushed a fix to dbus-broker upstream to ignore EACCES in `opendir()` to align it with the behavior of dbus-daemon. However, you should still fix these permissions, since it means anything installed into these directories will be ignored by dbus-daemon and dbus-broker, and thus it will not work.

Thanks
David

Comment 6 Arjun A.K. 2019-05-02 16:05:14 UTC
Looks like its working now, thanks.

Comment 7 Fedora Update System 2019-05-03 12:38:00 UTC
dbus-broker-21-2.fc30 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-4c057073ca

Comment 8 Fedora Update System 2019-05-04 01:57:43 UTC
dbus-broker-21-2.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-4c057073ca

Comment 9 Fedora Update System 2019-05-06 00:45:35 UTC
dbus-broker-21-2.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.