We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Environment:
DISTRIB_ID=Ubuntu DISTRIB_RELEASE=16.04 DISTRIB_CODENAME=xenial DISTRIB_DESCRIPTION="Ubuntu 16.04.6 LTS"
Kamailio installed from:
/etc/apt/sources.list deb http://deb.kamailio.org/kamailio53 xenial main deb-src http://deb.kamailio.org/kamailio53 xenial main
After Kamailio start, ownership of /var/run/kamailio/ and related files looks like:
/var/run/kamailio/
# ls -l /var/run/kamailio/ total 4 srw-rw---- 1 kamailio kamailio 0 May 20 15:41 kamailio_ctl -rw-r--r-- 1 kamailio kamailio 5 May 20 15:41 kamailio.pid prw-rw---- 1 root root 0 May 20 15:41 kamailio_rpc.fifo srw-rw---- 1 root root 0 May 20 15:41 kamailio_rpc.sock # ls -ld /var/run/kamailio/ drwxr-x--- 2 root root 120 May 20 15:41 /var/run/kamailio/
Note 'root' ownership. This causes these errors during Kamailio stop and probabaly some other issues too.
May 20 16:11:24 sip01 /usr/sbin/kamailio[5919]: ERROR: jsonrpcs [jsonrpcs_fifo.c:599]: jsonrpc_fifo_destroy(): FIFO stat failed: Permission denied May 20 16:11:24 sip01 /usr/sbin/kamailio[5919]: ERROR: jsonrpcs [jsonrpcs_sock.c:516]: jsonrpc_dgram_destroy(): socket stat failed: Permission denied May 20 16:11:24 sip01 /usr/sbin/kamailio[5919]: ERROR: ctl [ctl.c:390]: mod_destroy(): ERROR: ctl: could not delete unix socket /var/run/kamailio//kamailio_ctl: Permission denied (13)
To get the ownership right I have to modify /lib/systemd/system/kamailio.service and add:
/lib/systemd/system/kamailio.service
User=kamailio Group=kamailio
Now ownership after start looks like bellow and stops are clean too.
# ls -l /var/run/kamailio/ total 4 srw-rw---- 1 kamailio kamailio 0 May 20 15:52 kamailio_ctl -rw-r--r-- 1 kamailio kamailio 5 May 20 15:52 kamailio.pid prw-rw---- 1 kamailio kamailio 0 May 20 15:52 kamailio_rpc.fifo srw-rw---- 1 kamailio kamailio 0 May 20 15:52 kamailio_rpc.sock # ls -ld /var/run/kamailio/ drwxr-x--- 2 kamailio kamailio 120 May 20 15:52 /var/run/kamailio/
The text was updated successfully, but these errors were encountered:
@linuxmaniac, @sergey-safarov - is it something that has to be done in systemd unit files?
The jsonrpcs module has also params to set user/group as well -- iirc the values should be inherited from the core user/group, if not set explicitely.
Sorry, something went wrong.
Suggested modification already done for RPM packaging.
this was already at master, backported to 5.3
No branches or pull requests
Environment:
Kamailio installed from:
After Kamailio start, ownership of
/var/run/kamailio/
and related files looks like:Note 'root' ownership.
This causes these errors during Kamailio stop and probabaly some other issues too.
To get the ownership right I have to modify
/lib/systemd/system/kamailio.service
and add:
Now ownership after start looks like bellow and stops are clean too.
The text was updated successfully, but these errors were encountered: