Browse code

pkg: add CAP_CHOWN capability to Kamailio systemd service files to allow chown (#2391)

- add CAP_CHOWN capability to Kamailio systemd service files to allow chown
- needed e.g. for user and group setting from jsonrpcs and ctl modules
- related to github issue #2391

Henning Westerholt authored on 11/09/2020 10:51:23
Showing 9 changed files
... ...
@@ -20,6 +20,8 @@ Restart=on-failure
20 20
 # /run/kamailio in tmpfs
21 21
 RuntimeDirectory=kamailio
22 22
 RuntimeDirectoryMode=0770
23
+# necessary for chown of control files e.g. for jsonrpcs and ctl modules
24
+AmbientCapabilities=CAP_CHOWN
23 25
 
24 26
 [Install]
25 27
 WantedBy=multi-user.target
... ...
@@ -20,6 +20,8 @@ Restart=on-failure
20 20
 # /run/kamailio in tmpfs
21 21
 RuntimeDirectory=kamailio
22 22
 RuntimeDirectoryMode=0770
23
+# necessary for chown of control files e.g. for jsonrpcs and ctl modules
24
+AmbientCapabilities=CAP_CHOWN
23 25
 
24 26
 [Install]
25 27
 WantedBy=multi-user.target
... ...
@@ -20,6 +20,8 @@ Restart=on-failure
20 20
 # /run/kamailio in tmpfs
21 21
 RuntimeDirectory=kamailio
22 22
 RuntimeDirectoryMode=0770
23
+# necessary for chown of control files e.g. for jsonrpcs and ctl modules
24
+AmbientCapabilities=CAP_CHOWN
23 25
 
24 26
 [Install]
25 27
 WantedBy=multi-user.target
... ...
@@ -20,6 +20,8 @@ Restart=on-failure
20 20
 # /run/kamailio in tmpfs
21 21
 RuntimeDirectory=kamailio
22 22
 RuntimeDirectoryMode=0770
23
+# necessary for chown of control files e.g. for jsonrpcs and ctl modules
24
+AmbientCapabilities=CAP_CHOWN
23 25
 
24 26
 [Install]
25 27
 WantedBy=multi-user.target
... ...
@@ -20,6 +20,8 @@ Restart=on-failure
20 20
 # /run/kamailio in tmpfs
21 21
 RuntimeDirectory=kamailio
22 22
 RuntimeDirectoryMode=0770
23
+# necessary for chown of control files e.g. for jsonrpcs and ctl modules
24
+AmbientCapabilities=CAP_CHOWN
23 25
 
24 26
 [Install]
25 27
 WantedBy=multi-user.target
... ...
@@ -20,6 +20,8 @@ Restart=on-failure
20 20
 # /run/kamailio in tmpfs
21 21
 RuntimeDirectory=kamailio
22 22
 RuntimeDirectoryMode=0770
23
+# necessary for chown of control files e.g. for jsonrpcs and ctl modules
24
+AmbientCapabilities=CAP_CHOWN
23 25
 
24 26
 [Install]
25 27
 WantedBy=multi-user.target
... ...
@@ -20,6 +20,8 @@ Restart=on-failure
20 20
 # /run/kamailio in tmpfs
21 21
 RuntimeDirectory=kamailio
22 22
 RuntimeDirectoryMode=0770
23
+# necessary for chown of control files e.g. for jsonrpcs and ctl modules
24
+AmbientCapabilities=CAP_CHOWN
23 25
 
24 26
 [Install]
25 27
 WantedBy=multi-user.target
... ...
@@ -20,6 +20,8 @@ Restart=on-failure
20 20
 # /run/kamailio in tmpfs
21 21
 RuntimeDirectory=kamailio
22 22
 RuntimeDirectoryMode=0770
23
+# necessary for chown of control files e.g. for jsonrpcs and ctl modules
24
+AmbientCapabilities=CAP_CHOWN
23 25
 
24 26
 [Install]
25 27
 WantedBy=multi-user.target
... ...
@@ -13,6 +13,8 @@ Environment='PKG_MEMORY=8'
13 13
 EnvironmentFile=-/etc/sysconfig/kamailio
14 14
 ExecStart=/usr/sbin/kamailio -DD -P /run/kamailio/kamailio.pid -f $CFGFILE -m $SHM_MEMORY -M $PKG_MEMORY
15 15
 Restart=on-failure
16
+# necessary for chown of control files e.g. for jsonrpcs and ctl modules
17
+AmbientCapabilities=CAP_CHOWN
16 18
 
17 19
 [Install]
18 20
 WantedBy=multi-user.target