[Pianod] Problem with RasPi sound card access as user nobody

Peter Li chinasaurli at gmail.com
Thu May 30 22:34:54 PDT 2013


Hi guys, having trouble debugging this.  Basically on RasPi I've started 
having trouble running pianod as a service, similar to the issues that 
GoneWest was having.

When running as a service it gets called as root and then drops to user 
nobody (I'm pretty sure?).  Then when I try to play a station if has this:

    ALSA lib confmisc.c:768:(parse_card) cannot find card '0'
    ALSA lib conf.c:4241:(_snd_config_evaluate) function
    snd_func_card_driver returned error: No such file or directory
    ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
    ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_concat
    returned error: No such file or directory
    ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
    ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_refer
    returned error: No such file or directory
    ALSA lib conf.c:4720:(snd_config_expand) Evaluate error: No such
    file or directory
    ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM default
    2013-05-30 22:29:12: Cannot open audio device

And in netcat I get the Internal server error message.  I don't have the 
problem if I set the service to run as "-nroot" or "-nuser".

So I've been messing around trying to get user nobody access to the 
sound card.  I thought I could debug this from a terminal by running 
"sudo su nobody" to get a command line as user nobody.  As expected, 
running pianod from this terminal gives the same set of errors.  If I 
add user nobody to the "audio" group then running from pianod from the 
"nobody terminal" works.  So I thought I had figured it out. But running 
pianod as sudo either with no "-n" or with "-nnobody" still gives the 
errors.  So somehow the debugging terminal as user nobody is not giving 
me the same run environment as if pianod is run by root and then drops 
to nobody.

This is all a bit oblique, but anyone have any suggestions?
Thanks!
P
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.deviousfish.com/pipermail/pianod-deviousfish.com/attachments/20130530/6c312348/attachment-0002.htm>


More information about the Pianod mailing list