Pulseaudio failed to create secure directory in nfs share
Solution 1
You can Change Home Directory path by editing your /etc/passwd
file and then create home directory using :
/sbin/mkhomedir_helper <username> [<umask> [<skeldir>]]
One more thing may be pulseaudio
is running via different user, that's why it's trying to creating file in that user home's dir so, once check using ps -ef | grep pulse
and update in your question
Another Option :
Run pulseaudio systemwide
For some reasons is it a good thing to chose for a single pulseaudio daemon instead of one per logged in user
This is how you do it:
add to every user on the system the groups 'pulse' and 'pulse-access'
edit
/etc/pulse/daemon.conf
change 'daemonize = no' to 'daemonize = yes'
change 'system-instance = no' to 'system-instance= yes'
edit etc/default/pulseaudio
change '
PULSEAUDIO_SYSTEM_START=0
' to 'PULSEAUDIO_SYSTEM_START=1
'delete .pulse in your home directory and do the same fore other users
reboot the system
Solution 2
I think the better option (compared to running Pulseaudio systemwide) is to set a configuration location outside the NFS mount. The Pulseaudio manpage explains two possibilities:
- If a
~/.pulse/client.conf
is not found, the global/etc/pulse/client.conf
is used (and other config files in the same directories). To use the global settings, simply delete the user-specific settings; - If you want per-user instead of global settings, you can set the Pulseaudio environment variable (PULSE_CLIENTCONFIG) upon login (in
.bashrc
,.xinitrc
or usingpam_env.conf
).
Solution 3
You should be able to give the "pulse" user the ability to write to a file inside that share. The umask may prevent it but if you "chmod 777 .config/pulse" the service should be able to write to it.
Related videos on Youtube
user2109706
Updated on September 18, 2022Comments
-
user2109706 over 1 year
My pulseaudio cannot run, because it attempts to create
~/.config/pulse
under a different user. (probablypulse
?).user@localhost ~$ pulseaudio E: [pulseaudio] core-util.c: Failed to create secure directory (/home/user/.config/pulse): Permission denied
Since the home directory is mounted from nfs and the server will never allow user
pulse
to access that directory (even for reading) it must either use a different path outside the home directory or run with a different user.I have checked
/etc/pulse/client.conf
, but there doesn't seem to be any configuration option on that.Any ideas on how this problem can be solved?
-
user2109706 over 10 yearsHi, I don't know what you meant with that second home directory. So I have tried to run the daemon in root. It doesn't seem to work. Also running
pulseaudio -D
in root doesn't make it work. When attempting to run pavucontrol, it hangs while attempting to connect. Also/etc/default/pulseaudio
didn't exist, so I have created a new one. No user had a.pulse
directory. Only.config/pulse
so I have tried deleting that one, but it keeps coming back. -
user2109706 over 10 yearsAlso the user pulseaudio is running as is "pulse", but thats only if it ever gets to run without choking on that error.
-
user2109706 over 10 yearsNo, because the parent directory has no read/execute permission for pulse. Even the local root cannot access that dir.
-
user2109706 over 9 yearsHey thanks for the answer. I don't use setup anymore so I cannot verify this, but as far as I remember, the problem is that pulse would attempt to create
~/.pulse/client.conf
and choke, because it is not allowed to.