Asterisk and LCR socket rights

Jānis Rukšāns <[email protected]>
Newsgroups gmane.linux.isdn.i4l.user
Message-ID <1339613188.6302.16.camel@dogs>
Hi,

I'm trying to get Asterisk and LCR running with separate user accounts
(asterisk and lcr, respectively), and without making the socket world
writeable. I've changed socket rights to 0770 and added asterisk to the
lcr group, but chan_lcr still fails to open the socket.

Both Asterisk and LCR are started via systemd (Fedora 17). Strangely
enough, running lcradmin with sudo -u asterisk works just fine, but
maybe I'm missing something.

Any ideas? Here's some output (I modified chan_lcr to write out the
error message and user and group IDs):

$ tail /var/log/messages
Jun 13 21:15:16 dway lcr[3469]: LCR: Starting daemon.
[..]
Jun 13 21:15:41 dway asterisk[3485]: [call=NULL ast=NULL line=2047] Retry to open socket.
Jun 13 21:15:41 dway asterisk[3485]: [call=NULL ast=NULL line=1902] Failed to connect to socket '/var/run/lcr/LCR.socket': Permission denied. Is LCR running?
Jun 13 21:15:41 dway asterisk[3485]: [call=NULL ast=NULL line=1903] EUID: 997, EGID: 995
Jun 13 21:15:41 dway asterisk[3485]: [call=NULL ast=NULL line=1905] GID: 993
Jun 13 21:15:41 dway asterisk[3485]: [call=NULL ast=NULL line=1905] GID: 995

$ ls -lh /var/run/lcr/
total 4.0K
--w-------. 1 lcr lcr 0 Jun 13 21:15 lcr.lock
-rw-r--r--. 1 lcr lcr 5 Jun 13 21:15 lcr.pid
srwxrwx---. 1 lcr lcr 0 Jun 13 21:15 LCR.socket

$ grep /etc/passwd -e 997
asterisk:x:997:995:Asterisk User:/var/lib/asterisk:/sbin/nologin

$ grep /etc/group -e 993 -e 995
asterisk:x:995:
lcr:x:993:asterisk


Thanks,
Jānis

_______________________________________________
isdn4linux mailing list
[email protected]
https://www.isdn4linux.de/mailman/listinfo/isdn4linux
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.