Bug 7565 - PulseAudio refuses to start if home directory is owned by root
Summary: PulseAudio refuses to start if home directory is owned by root
Status: CLOSED FIXED
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Sound (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.12.1
Assignee: Linn
URL:
Keywords: nikle_tester, relnotes
Depends on:
Blocks:
 
Reported: 2020-10-06 11:13 CEST by Pierre Ossman
Modified: 2021-01-21 12:45 CET (History)
2 users (show)

See Also:
Acceptance Criteria:


Attachments

Description Pierre Ossman cendio 2020-10-06 11:13:37 CEST
We got a report that a customer got the old bug of some processes eating 100% CPU when sessions were disconnected, something we thought we solved with bug 4194.

The log shows that the issue is that the session PulseAudio failed to start:

> Running /opt/thinlinc/etc/xstartup.d/43-tl-pulseaudio-launch.sh (Starting session PulseAudio server)
> W: [pulseaudio] main.c: Couldn't canonicalize binary path, cannot self execute.
> E: [pulseaudio] core-util.c: Home directory not accessible: Permission denied
> Failed to start session PulseAudio server 

Apparently the customer has the somewhat odd setup of home directories being owned by root (and ACLs giving proper permissions for the user). This is not something that PulseAudio tolerates as it requires the home directory to be owned by the user.

It seems others have encountered this though, as upstream has a commit for this specific scenario:

https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/97d0eda2562af07b7514de075ddf62f9dd678e51
Comment 3 Pierre Ossman cendio 2020-10-06 13:12:22 CEST
I can reproduce this on RHEL 8 by setting up the home directory like so:

> $ chown root /home/cendio
> $ setfacl -m user:cendio:rwx /home/cendio
> $ getfacl /home/cendio
> # file: cendio/
> # owner: root
> # group: cendio
> user::rwx
> user:cendio:rwx
> group::---
> mask::rwx
> other::---
Comment 4 Pierre Ossman cendio 2020-10-06 13:31:03 CEST
The referenced commit fixes the issue on the same test machine.
Comment 9 Linn cendio 2020-12-23 13:41:17 CET
Tested with Jenkins build 1805 on Ubuntu 20.04, and PulseAudio is able to start with this fix. However, the warning from comment 1 is still present in xinit.log.

> Running /opt/thinlinc/etc/xstartup.d/43-tl-pulseaudio-launch.sh (Starting session PulseAudio server)
> W: [pulseaudio] main.c: Couldn't canonicalize binary path, cannot self execute.
> Session PulseAudio server started. Redirecting applications...
Comment 10 Niko Lehto cendio 2021-01-04 11:10:06 CET
Tested with RHEL8 server and 4.12.0 client. I could reproduce the issue using 4.12.0 server.

+------------------+------------+
| Server           | PulseAudio |
| 4.12.0           | running?   |
+------------------+------------+
|User owned /home/ | Yes        |
|Root owned /home/ | No         |
+------------------+------------+

+------------------+------------+
| Server           | PulseAudio |
| Nightly (6707)   | running?   |
+------------------+------------+
|User owned /home/ | Yes        |
|Root owned /home/ | Yes        |
+------------------+------------+

Nightly build 6707 solves this issue and the PulseAudio server is now starting correctly.
Release notes also looks good.

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