[問題] 請教播放音效權限的問題

看板Linux作者 (雙劍‧日光燈)時間10年前 (2015/05/05 00:09), 10年前編輯推噓1(101)
留言2則, 2人參與, 最新討論串1/1
自己興趣寫了一些自己在家裡玩的服務,碰到了關於音樂播放的問題 (我是覺得跟權限有關係) 想請教一下, 利用自己架設的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

05/05 00:22, , 1F
web service 的 user 沒加 group ?
05/05 00:22, 1F

05/05 20:39, , 2F
沒錯,加user以後便可以了,謝謝
05/05 20:39, 2F
文章代碼(AID): #1LHvd4Ja (Linux)