看板 Linux 關於我們 聯絡資訊
自己興趣寫了一些自己在家裡玩的服務,碰到了關於音樂播放的問題 (我是覺得跟權限有關係) 想請教一下, 利用自己架設的web App執行mpg123播放音樂時都會出現下面所附錯誤訊息 但是如果是root或是normal_user執行mpg123時卻可以正確播放。 錯誤訊息如下: Directory: /srv/http/Mysite/static/mp3/ Playing MPEG stream 1 of 1: XXXX.mp3 ... Home directory not accessible: Permission denied ALSA lib confmisc.c:768:(parse_card) cannot find card '0' ALSA lib conf.c:4260:(_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:4260:(_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:4260:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:4739:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2267:(snd_pcm_open_noupdate) Unknown PCM default [sdl.c:76] error: Couldn't open SDL audio: No available audio device [audio.c:643] error: failed to open audio device [mpg123.c:547] error: failed to reset audio device: No such file or directory /etc/group檔案中,已有如下設定 audio:x:92:normal_user,daemon OS是ArchLinux,希望有經驗的高手能指點一下。 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 219.85.47.171 ※ 文章網址: https://www.ptt.cc/bbs/Linux/M.1430755780.A.4E4.html ※ 編輯: yanganto (219.85.47.171), 05/05/2015 00:20:54
Bencrie: web service 的 user 沒加 group ? 05/05 00:22
yanganto: 沒錯,加user以後便可以了,謝謝 05/05 20:39