[Spce-user] ngcpcfg permissions bug

Michael Prokop mprokop at sipwise.com
Fri Sep 29 03:41:19 EDT 2023


Hi,

* Jon Bonilla (Manwe) [Thu Sep 28, 2023 at 07:06:10PM +0200]:

> Using version 9.5.7
> 
> I've realized that the config file generated from a customtt templates has 000
> permissions if the tt2 template does not exist.
> 
> When I want to create a new config file in a ngcp system I create a customtt
> template although the original file is not in the ngcp template set because
> it's easier later to track changes and to move configurations to other systems.
> 
> But in 9.5.7 I've realized that the config files generated have no
> read-write-exec permissions unless I also create a fake tt2 file for it.
> 
> Reproduce: 
> 
> echo "test" > 
> /etc/ngcp-config/templates/etc/kamailio/lb/manwecustom.cfg.customtt.tt2
> ngcpcfg build /etc/kamailio/lb
> ll /etc/kamailio/lb/manwecustom.cfg
> 
> touch /etc/ngcp-config/templates/etc/kamailio/lb/manwecustom.cfg.tt2
> ngcpcfg build /etc/kamailio/lb
> ll /etc/kamailio/lb/manwecustom.cfg

Confirmed and reproduced (reported as MT#58402), thanks for
reporting, Jon.

The problem no longer exists in NGCP releases >=mr10.4, we'll
provide backports/hotfixes for older support releases.

FTR, with the fixed ngcpcfg behavior it will warn you about it,
like:

  base filename:/etc/ngcp-config/templates/etc/kamailio/lb/manwecustom.cfg.tt2 for:/etc/ngcp-config/templates/etc/kamailio/lb/manwecustom.cfg.customtt.tt2 not found

And if you need file permissions other than the default
(0444/-r--r--r--), you need to provide the according base filename
with the expected permissions for sure.

regards
-mika-
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20230929/c936af9f/attachment.asc>


More information about the Spce-user mailing list