rndc.key keeps losing group read access

akust0m

Well-Known Member
Feb 19, 2016
72
4
58
Melbourne
cPanel Access Level
Root Administrator
Hey,

I *think* this may be cPanel doing this, I'm not entirely sure.

But '/etc/rndc.key' keeps switching back to 600 but I'd like it set to 640. The file is set to named:named (owner:group).

The reason for this is because I'm using a server monitoring platform where I've written a custom module to extra DNS query information. The user that the monitoring agent runs as has been added to the 'named' group. Every minute the monitoring agent will run a script and part of that script is a call to 'rndc stats' which requires the ability to read the file '/etc/rndc.key'.

Does cPanel have an ongoing check in place to revert permissions on '/etc/rndc.key' back to 600? If so, is there a way I can prevent this from happening and keep it on 640?

Thanks!
 

dalem

Well-Known Member
PartnerNOC
Oct 24, 2003
2,983
159
368
SLC
cPanel Access Level
DataCenter Provider
upcp sets the permissions back to 600
create a create a file /scripts/postupcp an add

chmod 640 /etc/rndc.key

to the file
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,300
363
Houston