Page 1 of 1

nagcmd after install

Posted: Wed Feb 11, 2026 4:17 pm
by vinmansbrew
rhel 9.7, core 4.5.11
So, whatever nagios install doc I used, didn't mention the nagcmd group.
So, I went on my merry way and get everything installed, and everything works, except command through the webui. Which apparently requires nagcmd.

I tried just adding the group and adding nagios and apache to it. Didn't help.
I changed the ownership on /usr/local/nagios/var/rw to nagios:nagcmd That didn't help either.

Is this something that can still be added in/fixed, or am I screwed and have to start all over?

Re: nagcmd after install

Posted: Fri Feb 13, 2026 11:30 am
by vinmansbrew
Ok, sell if anyone else has this issue, you aren't screwed.

steps I took:
sudo groupadd nagcmd
sudo usermod -aG nagcmd nagios
sudo usermod -aG nagcmd apache
sudo chown -R nagios:nagcmd /usr/local/nagios/var/rw
sudo chmod 2775 /usr/local/nagios/var/rw
sudo systemctl restart nagios
sudo systemctl restart httpd

ls -l /usr/local/nagios/var/rw/nagios.cmd should show prw-rw---- 1 nagios nagcmd

sudo chcon -R -t httpd_sys_rw_content_t /usr/local/nagios/var/rw
sudo semanage fcontext -a -t httpd_sys_rw_content_t "/usr/local/nagios/var/rw(/.*)?"
sudo restorecon -R /usr/local/nagios/var/rw

After this, I was able to do commands such as acknowledging notifications, in the webui.