group ownership of nagios.cmd

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
User avatar
jssingh
Posts: 110
Joined: Mon Apr 29, 2013 4:55 pm

group ownership of nagios.cmd

Post by jssingh »

We have 2 instances of nagios with the same setup. On both of them nagios.cmd is owned by the nagios user and the group is the group with the nrdp user and the nagios user.

On one system (the production system), when I restart nagios it changes the group to the default group for the nagios user, but on the other system it keeps the group the same. So obviously there is something different between the two systems, but I can't figure out what it is. Does anyone know what settings would cause this behavior?
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: group ownership of nagios.cmd

Post by rkennedy »

I believe this is from when you first configured Core, and appended the --with-command-group=<user>. On the Core system I'm running for example, I used the 'nagcmd' user, and that's what it defaults to after a restart as well.

Code: Select all

[root@localhost rw]# ls -l nagios.cmd
prw-rw---- 1 nagios nagcmd 0 May  6 15:12 nagios.cmd
[root@localhost rw]# chown nagios:nagios nagios.cmd
[root@localhost rw]# ls -l
total 0
prw-rw---- 1 nagios nagios 0 May  6 15:12 nagios.cmd
srw-rw---- 1 nagios nagcmd 0 May  6 15:12 nagios.qh
[root@localhost rw]# service nagios restart
Restarting nagios (via systemctl):                         [  OK  ]
[root@localhost rw]# ls -l
total 0
prw-rw---- 1 nagios nagcmd 0 May 26 16:31 nagios.cmd
srw-rw---- 1 nagios nagcmd 0 May 26 16:31 nagios.qh
Former Nagios Employee
User avatar
eloyd
Cool Title Here
Posts: 2129
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: group ownership of nagios.cmd

Post by eloyd »

What he said. And I forget, ALL THE TIME, to use that argument when I'm building Core. Makes me scratch my head a lot until I remember, go reconfigure, recompile, and reinstall just so I can write stuff to nagios.cmd.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoydI'm a Nagios Fanatic!
User avatar
jssingh
Posts: 110
Joined: Mon Apr 29, 2013 4:55 pm

Re: group ownership of nagios.cmd

Post by jssingh »

Yeah, apparently I remembered to do it for one server and not the other! :)
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: group ownership of nagios.cmd

Post by rkennedy »

No problem! Were you able to get this resolved then @jssingh?
Former Nagios Employee
User avatar
jssingh
Posts: 110
Joined: Mon Apr 29, 2013 4:55 pm

Re: group ownership of nagios.cmd

Post by jssingh »

yes. thank you.
Locked