The commit 0436af5abd8b73e breaks startup for jsonrpcs module.
Logs:
```
Jul 5 10:04:41 kam01 kamailio[4951]: ERROR: jsonrpcs [jsonrpcs_sock.c:358]:
jsonrpc_dgram_init_server(): failed to change the owner/group for
/var/run/kamailio/kamailio_rpc.sock to 33.0;Operation not permitted[1]
Jul 5 10:04:41 kam01 kamailio[4951]: CRITICAL: jsonrpcs [jsonrpcs_sock.c:423]:
jsonrpc_dgram_init_socks(): initializing datagram server function returned error
Jul 5 10:04:41 kam01 kamailio[4951]: ERROR: jsonrpcs [jsonrpcs_sock.c:246]:
jsonrpc_dgram_mod_init(): init datagram sockets function failed
Jul 5 10:04:41 kam01 kamailio[4951]: ERROR: jsonrpcs [jsonrpcs_mod.c:1150]: mod_init():
cannot initialize datagram transport
Jul 5 10:04:41 kam01 kamailio[4951]: ERROR: <core> [core/sr_module.c:849]:
init_mod(): Error while initializing module jsonrpcs
(/usr/lib/x86_64-linux-gnu/kamailio/modules/jsonrpcs.so)
```
Relevant cfg:
```
loadmodule "jsonrpcs.so"
modparam("jsonrpcs", "pretty_format", 1)
modparam("jsonrpcs", "dgram_user", "www-data")
modparam("jsonrpcs", "dgram_group", "root")
modparam("jsonrpcs", "transport", 7)
```
Previously Kamailio was started as root, and then configured with -u $USER and -g $GROUP
to drop privileges to the lower user/group. During startup Kamailio could create the
socket with the correct permissions.
The mentioned commit changes this to: start Kamailio directly as user Kamailio and group
Kamailio, which don't have privileges create the sockets with the correct
permissions.
Not sure about the motivation about this change, so I don't want to simple revert it.
Maybe @sergey-safarov or other developers can comment.
--
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/2391