<p></p>
<h3>Description</h3>
<p>I want start kamailio as <code>root</code> user with carrierroute module.<br>
and get this error message</p>
<pre><code>[root@ip-172-22-6-233 config]# kamailio -DD -E
 0(13687) INFO: <core> [core/sctp_core.c:74]: sctp_core_check_support(): SCTP API not enabled - if you want to use it, load sctp module
Listening on 
             udp: 172.22.6.233:5060
             tcp: 172.22.6.233:5060
Aliases: 
             tcp: ip-172-22-6-233.us-west-1.compute.internal:5060
             udp: ip-172-22-6-233.us-west-1.compute.internal:5060

 0(13687) INFO: <core> [core/tcp_main.c:5042]: init_tcp(): using epoll_lt as the io watch method (auto detected)
 0(13687) INFO: carrierroute [carrierroute.c:197]: mod_init(): use file as configuration source
 0(13687) ERROR: carrierroute [carrierroute.c:219]: mod_init(): config file /etc/kamailio/carrierroute.conf not writable
 0(13687) ERROR: <core> [core/sr_module.c:849]: init_mod(): Error while initializing module carrierroute (/usr/lib64/kamailio/modules/carrierroute.so)
ERROR: error while initializing modules
 0(13687) INFO: <core> [core/sctp_core.c:53]: sctp_core_destroy(): SCTP API not initialized
</code></pre>
<p>I checked file permissions</p>
<div class="highlight highlight-source-shell"><pre>[root@ip-172-22-6-233 config]<span class="pl-c"><span class="pl-c">#</span> ls -l /etc/kamailio/carrierroute.conf</span>
-rw-rw----. 1 kamailio kamailio 403 Jun 23 18:07 /etc/kamailio/carrierroute.conf</pre></div>
<p>Looks as file permissions as expected.</p>
<h3>Troubleshooting</h3>
<p>Issue related to a difference of process user/group and file user/group.</p>
<h4>Reproduction</h4>
<ol>
<li>create <code>/etc/kamailio/carrierroute.conf</code> with kamailio user/group;</li>
<li>change file permissions to 660;</li>
<li>start kamailio as root user</li>
</ol>
<h4>Debugging Data</h4>
<p>none</p>
<h4>Log Messages</h4>
<p>none</p>
<h4>SIP Traffic</h4>
<p>none</p>
<h3>Possible Solutions</h3>
<p>Add information about the expected user group permissions, like</p>
<pre><code>config file /etc/kamailio/carrierroute.conf not writable or not owned by "root" user and "root" group
</code></pre>
<h3>Additional Information</h3>
<ul>
<li><strong>Kamailio Version</strong> - output of <code>kamailio -v</code></li>
</ul>
<pre><code>[root@ip-172-22-6-233 config]# kamailio -v
version: kamailio 5.3.4 (x86_64/linux) 117ff9
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, 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, TLS_PTHREAD_MUTEX_SHARED
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: 117ff9 
compiled on 15:31:51 May  6 2020 with gcc 8.3.1
</code></pre>
<ul>
<li><strong>Operating System</strong>:</li>
</ul>
<pre><code>[root@ip-172-22-6-233 config]# cat /etc/os-release 
NAME="CentOS Linux"
VERSION="8 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Linux 8 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-8"
CENTOS_MANTISBT_PROJECT_VERSION="8"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="8"
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/2369">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZLFQVG4RG54HTBJ2EDRYDXQZANCNFSM4OF5RKBQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZL7FJQ2ZAL4LUO4BATRYDXQZA5CNFSM4OF5RKB2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4JTDOYLQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/2369",
"url": "https://github.com/kamailio/kamailio/issues/2369",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>