nagios.cmd
glynn.seymour at bayerbbs.com
glynn.seymour at bayerbbs.com
Fri Jul 6 16:12:56 CEST 2007
I think your ownership is wrong, my nagios.cmd is owned by nagios.nagcmd
and the http user is a member of nagcmd (nagios command group I created -
think this is a default? been a while since I installed it :-)) - it's
the http user writing to the pipe, and the nagios user (service) reading
it. Permissions look consistent with mine (660, prw-rw----).
Why the file perms changed,
6. Set user ID, set group ID, sticky bit
In addition to the basic permissions discussed above, there are also three
bits of information defined for files in UNIX:
SUID or setuid: change user ID on execution. If setuid bit is set, when
the file will be executed by a user, the process will have the same rights
as the owner of the file being executed.
SGID or setgid: change group ID on execution. Same as above, but inherits
rights of the group of the owner of the file. For directories it also may
mean that when a new file is created in the directory it will inherit the
group of the directory (and not of the user who created the file).
Sticky bit. It was used to trigger process to "stick" in memory after it
is finished, now this usage is obsolete. Currently its use is system
dependant and it is mostly used to suppress deletion of the files that
belong to other users in the folder where you have "write" access to.
I'm guessing this happens first time you attempt to execute, regardless of
whether your submission succeeds or not - bet somebody can explain it
properly, I'm rubbish on perms.
<SNIP>####################################
---------------------------------------------------------------------------------------------------------------------
Now to show you where I run into the actual trouble. I restarted nagios
and it changed the permissions on the file.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
root at maverick:/usr/local/nagios/var/rw# ls -al
total 0
drwxrwsrwx 2 nagios nagios 80 2007-07-03 16:18 .
drwxrwxrwx 4 nagios nagios 384 2007-07-06 08:40 ..
prwxrwxrwx 1 nagios nagios 0 2007-07-06 08:38 nagios.cmd
root at maverick:/usr/local/nagios/var/rw # /etc/init.d/nagios restart
Running configuration check...done
Stopping nagios: done.
Starting nagios: done.
root at maverick:/usr/local/nagios/var/rw # ls -al
total 0
drwxrwsrwx 2 nagios nagios 80 2007-07-06 08:40 .
drwxrwxrwx 4 nagios nagios 384 2007-07-06 08:40 ..
prw-rw---- 1 nagios nagios 0 2007-07-06 08:40 nagios.cmd
root at maverick:/usr/local/nagios/var/rw#
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
The file permissions are incorrect and seemingly nagios caused the
problem. Notice that the new file does not even have the same permissions
as the file it created before.
<SNIP>###########################################
HTH.
___________________________________________________________________________
Glynn Seymour
Network Consultant
BBS EMEA RSU
Bayer plc, UK
__________________________________________________________________________
Bayer plc is registered in England under number 935048. Registered Office:
Bayer House, Strawberry Hill, Newbury, Berkshire RG14 1JA.
The information contained in this e-mail is for the exclusive use of the
intended recipient(s) and may be confidential, proprietary, and/or legally
privileged. Inadvertent disclosure of this message does not constitute a
waiver of any privilege. If you receive this message in error, please do
not directly or indirectly use, print, copy, forward, or disclose any part
of this message. Please also delete this e-mail and all copies and notify
the sender.Thank you.
For alternate languages please go to http://bayerdisclaimer.bayerweb.com
__________________________________________________________________________
-------------- next part --------------
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list