### Description
I want start kamailio as `root` user with carrierroute module.
and get this error message
```
[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
```
I checked file permissions
```sh
[root@ip-172-22-6-233 config]# ls -l /etc/kamailio/carrierroute.conf
-rw-rw----. 1 kamailio kamailio 403 Jun 23 18:07 /etc/kamailio/carrierroute.conf
```
Looks as file permissions as expected.
### Troubleshooting
Issue related to a difference of process user/group and file user/group.
#### Reproduction
1) create `/etc/kamailio/carrierroute.conf` with kamailio user/group;
2) change file permissions to 660;
3) start kamailio as root user
#### Debugging Data
none
#### Log Messages
none
#### SIP Traffic
none
### Possible Solutions
Add information about the expected user group permissions, like
```
config file /etc/kamailio/carrierroute.conf not writable or not owned by "root" user and "root" group
```
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
[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
```
* **Operating System**:
```
[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"
```
--
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/2369
Module: kamailio
Branch: master
Commit: 7ac314353f206924234ee416829fc9d75f52a737
URL: https://github.com/kamailio/kamailio/commit/7ac314353f206924234ee416829fc9d…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2020-06-29T08:31:12+02:00
modules: readme files regenerated - carrierroute ... [skip ci]
---
Modified: src/modules/carrierroute/README
---
Diff: https://github.com/kamailio/kamailio/commit/7ac314353f206924234ee416829fc9d…
Patch: https://github.com/kamailio/kamailio/commit/7ac314353f206924234ee416829fc9d…
---
diff --git a/src/modules/carrierroute/README b/src/modules/carrierroute/README
index cb659bdf75..8f1b4a0532 100644
--- a/src/modules/carrierroute/README
+++ b/src/modules/carrierroute/README
@@ -365,7 +365,8 @@ modparam("carrierroute", "config_source", "file")
3.6. config_file (string)
- Specifies the path to the config file.
+ Specifies the path to the config file. The file has to be owned by the
+ user and group used to run Kamailio.
Default value is “/etc/kamailio/carrierroute.conf”.
Module: kamailio
Branch: master
Commit: 214c762c46d5cd5892d2ddc06a25193a01164e8b
URL: https://github.com/kamailio/kamailio/commit/214c762c46d5cd5892d2ddc06a25193…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-06-29T08:25:11+02:00
carrierroute: docs - note about config file ownership
- GH #2369
---
Modified: src/modules/carrierroute/doc/carrierroute_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/214c762c46d5cd5892d2ddc06a25193…
Patch: https://github.com/kamailio/kamailio/commit/214c762c46d5cd5892d2ddc06a25193…
---
diff --git a/src/modules/carrierroute/doc/carrierroute_admin.xml b/src/modules/carrierroute/doc/carrierroute_admin.xml
index 21fb73f42e..dee8d006f5 100644
--- a/src/modules/carrierroute/doc/carrierroute_admin.xml
+++ b/src/modules/carrierroute/doc/carrierroute_admin.xml
@@ -206,7 +206,8 @@ modparam("carrierroute", "config_source", "file")
<section>
<title><varname>config_file</varname> (string)</title>
<para>
- Specifies the path to the config file.
+ Specifies the path to the config file. The file has to be owned by
+ the user and group used to run &kamailio;.
</para>
<para>
<emphasis>
#### Pre-Submission Checklist
- [x] Commit message has the format required by CONTRIBUTING guide
- [x] Commits are split per component (core, individual modules, libs, utils, ...)
- [x] Each component has a single commit (if not, squash them into one commit)
- [ ] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [x] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [ ] PR should be backported to stable branches
- [ ] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
I have
- fixed DocBook validator warnings;
- space formatting;
- simplified route[WITHINDLG]
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2375
-- Commit Summary --
* dispatcher: docbook space formating
* dispatcher: docbook - fixed "Document root element "chapter", must match DOCTYPE root "book"."
* dispatcher: docbook - fixed "The content of the parent element type is element only."
* dispatcher: docbook - fixed "The content of the parent element type is element only."
* dispatcher: docbook - fixed 'Attribute "xmlns:xi" must be declared for element type'
* dispatcher: docbook - space formating
* dispatcher: docbook - space formating
* dispatcher: docbook - fixed 'Document root element "chapter", must match DOCTYPE root "book".'
* dispatcher: docbook - ident formating using Oxygen 13
* dispatcher: docbook - fixed 'Attribute "xmlns:xi" must be declared for element type'
* dispatcher: docbook - ident formating using Oxygen 13
* dispatcher: cfg - more simple nesing for route[WITHINDLG]
* dispatcher: cfg - simplified WITHINDLG
* dispatcher: cfg - simplified WITHINDLG
-- File Changes --
M src/modules/dispatcher/doc/dispatcher.cfg (57)
M src/modules/dispatcher/doc/dispatcher.xml (179)
M src/modules/dispatcher/doc/dispatcher_admin.xml (1250)
M src/modules/dispatcher/doc/dispatcher_faq.xml (143)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2375.patchhttps://github.com/kamailio/kamailio/pull/2375.diff
--
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/pull/2375