I have a slight issue where I am running snmptt and when it processes an snmp trap it writes to the nagios.cmd file, but for some reason it is getting a permission denied even though it is running as root.
The permissions on the directory are :
drwxrwsr-x 2 nagios nagcmd 4096 2014-10-07 11:12 rw
and on the file :
prw-rw---- 1 nagios nagcmd 0 2014-10-07 10:43 nagios.cmd
the groups are :
nagios:!
nagcmd:!
how do I get nagios (on a restart) to create the nagios.cmd file with 666 permissions
I tried the umask line in the .bashrc for the nagios user, but that did not seem to do it.
Thanks in advance