[sr-dev] [kamailio/kamailio] bug: RPCFIFOPATH / DEFINE_FIFO_NAME invalid acces due changed to root at run (#1827)

PICCORO Lenz McKAY notifications at github.com
Thu Jan 31 17:29:26 CET 2019


### Description

the /var/run/kamailio directory for the fifo and crtl files are  denied for acces to the service
as i can see directory are owed byt root and only ower and group have
access 

kamailio 4.4 backported by me for Debian jessie have this:
`drwxr-xr-x 2 kamailio kamailio 100 Aug 15 17:33 kamailio`
kamailio 5.2 installed on buster/testing build from sources:
`drwxr-x--- 2 root root 120 Jan 30 09:35 kamailio`

**NOTE** no definiton are setup, and surprise if i defined some, the only working dir are /tmp !!!


### Troubleshooting


kamailio 4.4 backported by me for Debian jessie have this:
`drwxr-xr-x 2 kamailio kamailio 100 Aug 15 17:33 kamailio`
kamailio 5.2 installed on buster/testing build from sources:
`drwxr-x--- 2 root root 120 Jan 30 09:35 kamailio`

due that several issues are happened if we started using some modules
due unable to manage the socket control:

```
Jan 31 15:35:51 venenux-debian kamailio[16861]: 17(16889) ERROR:
<core> [core/io_wait.h:1040]: io_wait_loop_epoll(): epoll_wait(7,
0x7f6ed6f88d88, 0, 5000): Invalid argument [22]
Jan 31 15:35:51 venenux-debian kamailio[16861]: 0(16863) ERROR: ctl
[ctl.c:390]: mod_destroy(): ERROR: ctl: could not delete unix socket
/var/run/kamailio//kamailio_ctl: Permission denied (13)
Jan 31 15:35:51 venenux-debian kamailio[16861]: 0(16863) DEBUG: <core>
[db_pool.c:100]: pool_remove(): removing connection from the pool
Jan 31 15:35:51 venenux-debian kamailio[16861]: 0(16863) DEBUG: tm
[t_funcs.c:85]: tm_shutdown(): start
Jan 31 15:35:51 venenux-debian kamailio[16861]: 0(16863) DEBUG: tm
[t_funcs.c:88]: tm_shutdown(): emptying hash table
Jan 31 15:35:51 venenux-debian kamailio[16861]: 0(16863) DEBUG: tm
[t_funcs.c:90]: tm_shutdown(): removing semaphores
Jan 31 15:35:51 venenux-debian kamailio[16861]: 0(16863) DEBUG: tm
[t_funcs.c:92]: tm_shutdown(): destroying tmcb lists
Jan 31 15:35:51 venenux-debian kamailio[16861]: 0(16863) DEBUG: tm
[t_funcs.c:95]: tm_shutdown(): done
Jan 31 15:35:51 venenux-debian kamailio[16861]: 0(16863) ERROR:
jsonrpcs [jsonrpcs_fifo.c:599]: jsonrpc_fifo_destroy(): FIFO stat
failed: Permission denied
Jan 31 15:35:51 venenux-debian kamailio[16861]: 0(16863) ERROR:
jsonrpcs [jsonrpcs_sock.c:516]: jsonrpc_dgram_destroy(): socket stat
failed: Permission denied
```

#### Reproduction

build from sources with default values enable dialog, blf support and asterisk and start service.. when try to control using socket kamailio cannot comunicate with itselft! very ironic!


#### Log Messages

```
Jan 31 15:35:51 venenux-debian kamailio[16861]: 17(16889) ERROR:
<core> [core/io_wait.h:1040]: io_wait_loop_epoll(): epoll_wait(7,
0x7f6ed6f88d88, 0, 5000): Invalid argument [22]
Jan 31 15:35:51 venenux-debian kamailio[16861]: 0(16863) ERROR: ctl
[ctl.c:390]: mod_destroy(): ERROR: ctl: could not delete unix socket
/var/run/kamailio//kamailio_ctl: Permission denied (13)
Jan 31 15:35:51 venenux-debian kamailio[16861]: 0(16863) DEBUG: <core>
[db_pool.c:100]: pool_remove(): removing connection from the pool
Jan 31 15:35:51 venenux-debian kamailio[16861]: 0(16863) DEBUG: tm
[t_funcs.c:85]: tm_shutdown(): start
Jan 31 15:35:51 venenux-debian kamailio[16861]: 0(16863) DEBUG: tm
[t_funcs.c:88]: tm_shutdown(): emptying hash table
Jan 31 15:35:51 venenux-debian kamailio[16861]: 0(16863) DEBUG: tm
[t_funcs.c:90]: tm_shutdown(): removing semaphores
Jan 31 15:35:51 venenux-debian kamailio[16861]: 0(16863) DEBUG: tm
[t_funcs.c:92]: tm_shutdown(): destroying tmcb lists
Jan 31 15:35:51 venenux-debian kamailio[16861]: 0(16863) DEBUG: tm
[t_funcs.c:95]: tm_shutdown(): done
Jan 31 15:35:51 venenux-debian kamailio[16861]: 0(16863) ERROR:
jsonrpcs [jsonrpcs_fifo.c:599]: jsonrpc_fifo_destroy(): FIFO stat
failed: Permission denied
Jan 31 15:35:51 venenux-debian kamailio[16861]: 0(16863) ERROR:
jsonrpcs [jsonrpcs_sock.c:516]: jsonrpc_dgram_destroy(): socket stat
failed: Permission denied
```


#### SIP Traffic

NOT RELATED
### Additional Information

  * **Kamailio Version** - output of `kamailio -v`

```
version: kamailio 5.2.1 (x86_64/linux) 
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144 MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown 
compiled with gcc 4.9.2

```

* **Operating System**:

```
Debian buster/testing
```


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1827
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20190131/8da00d6c/attachment.html>


More information about the sr-dev mailing list