<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>RE: [Nagios-users] RE: Permissions Error</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>FYI, </FONT>
</P>

<P><FONT SIZE=2>I have just built up a clean install of Redhat 8, and Nagios1.0</FONT>
<BR><FONT SIZE=2>I have got Authentication setup and working ok (I can view cgi's), however I am unable to send commands from the Web Pages to Nagios (Scheduling Checks etc.) </FONT></P>

<P><FONT SIZE=2>I am recieving the error </FONT>
</P>

<P><FONT SIZE=2>  Error: Could not stat() command file '/usr/local/nagios/var/rw/nagios.cmd'!</FONT>
<BR><FONT SIZE=2>  The external command file may be missing, Nagios may not be running, and/or Nagios may not be checking external commands. </FONT></P>

<P><FONT SIZE=2>  An error occurred while attempting to commit your command for processing.</FONT>
<BR><FONT SIZE=2>:(</FONT>
</P>

<P><FONT SIZE=2>If possible I would suggest you backup the config CGI's (hosts services etc) and start over, it seems to be easier than troubleshooting.</FONT></P>

<P><FONT SIZE=2>Chris... yup another Chris.</FONT>
</P>

<P><FONT SIZE=2>Just for reference I've included the bits below so you can cross reference your config files.</FONT>
</P>

<P><FONT SIZE=2>cgi.cfg</FONT>
<BR><FONT SIZE=2>-------</FONT>
<BR><FONT SIZE=2>authorized_for_system_information=xxxx,nagiosadmin,</FONT>
<BR><FONT SIZE=2>authorized_for_system_commands=xxxx,nagiosadmin,</FONT>
<BR><FONT SIZE=2>authorized_for_configuration_information=xxxx,nagiosadmin,</FONT>
<BR><FONT SIZE=2>authorized_for_all_hosts=xxxx,nagiosadmin,</FONT>
<BR><FONT SIZE=2>authorized_for_all_host_commands=xxxx,nagiosadmin,</FONT>
<BR><FONT SIZE=2>authorized_for_all_services=xxxx,nagiosadmin,</FONT>
<BR><FONT SIZE=2>authorized_for_all_service_commands=xxxx,nagiosadmin,</FONT>
</P>

<P><FONT SIZE=2>.htaccess (in /usr/local/nagios/share/ and  /usr/local/nagios/sbin/)</FONT>
<BR><FONT SIZE=2>---------</FONT>
<BR><FONT SIZE=2>AuthName "Nagios Access"</FONT>
<BR><FONT SIZE=2>AuthType Basic</FONT>
<BR><FONT SIZE=2>AuthUserFile /usr/local/nagios/etc/htpasswd.users</FONT>
</P>

<P><FONT SIZE=2>/usr/local/nagios/etc/htpasswd.users</FONT>
<BR><FONT SIZE=2>------------------------------------</FONT>
<BR><FONT SIZE=2>nagiosadmin:<encrypted></FONT>
</P>

<P><FONT SIZE=2>/etc/httpd/conf/httpd.conf (added the following, otherwise, no changes from default)</FONT>
<BR><FONT SIZE=2>-------------------------- </FONT>
<BR><FONT SIZE=2>ScriptAlias /nagios/cgi-bin/ /usr/local/nagios/sbin/</FONT>
<BR><FONT SIZE=2><Directory "/usr/local/nagios/sbin/"></FONT>
<BR><FONT SIZE=2>    AllowOverride AuthConfig</FONT>
<BR><FONT SIZE=2>    Options ExecCGI</FONT>
<BR><FONT SIZE=2>    Order allow,deny</FONT>
<BR><FONT SIZE=2>    Allow from all</FONT>
<BR><FONT SIZE=2></Directory></FONT>
</P>

<P><FONT SIZE=2>Alias /nagios/ /usr/local/nagios/share/</FONT>
<BR><FONT SIZE=2><Directory "/usr/local/nagios/share"></FONT>
<BR><FONT SIZE=2>    Options None</FONT>
<BR><FONT SIZE=2>    AllowOverride AuthConfig</FONT>
<BR><FONT SIZE=2>    Order allow,deny</FONT>
<BR><FONT SIZE=2>    Allow from all</FONT>
<BR><FONT SIZE=2></Directory></FONT>
</P>

<P><FONT SIZE=2>/etc/local/nagios/etc/contacts.cfg</FONT>
<BR><FONT SIZE=2>----------------------------------</FONT>
<BR><FONT SIZE=2>define contact {</FONT>
<BR><FONT SIZE=2>contact_name                   nagiosadmin</FONT>
<BR><FONT SIZE=2>alias                          Nagios Admin</FONT>
<BR><FONT SIZE=2>service_notification_period    24x7</FONT>
<BR><FONT SIZE=2>host_notification_period       24x7</FONT>
<BR><FONT SIZE=2>service_notification_options   w,u,c,r</FONT>
<BR><FONT SIZE=2>host_notification_options      d,u,r</FONT>
<BR><FONT SIZE=2>service_notification_commands  notify-by-email,notify-by-epager</FONT>
<BR><FONT SIZE=2>host_notification_commands     host-notify-by-email,host-notify-by-epager</FONT>
<BR><FONT SIZE=2>email                          nagios-admin@localhost.localdomain</FONT>
<BR><FONT SIZE=2>pager                          pagenagios-admin@localhost.localdomain</FONT>
<BR><FONT SIZE=2>}</FONT>
</P>

<P><FONT SIZE=2>/etc/local/nagios/etc/nagios.cfg</FONT>
<BR><FONT SIZE=2>---------------------------------</FONT>
<BR><FONT SIZE=2>#</FONT>
<BR><FONT SIZE=2># nagios.cfg - Config file for Nagios (www.nagios.org)</FONT>
<BR><FONT SIZE=2>#</FONT>
<BR><FONT SIZE=2># Written by Nagat. Manually editing this file is a bad idea since Nagat will</FONT>
<BR><FONT SIZE=2># overwrite it. Delete the nagatobj.dat file in the nagios/etc directory to</FONT>
<BR><FONT SIZE=2># reread the Nagios configuration.</FONT>
<BR><FONT SIZE=2>#</FONT>
<BR><FONT SIZE=2>log_file=/usr/local/nagios/var/nagios.log</FONT>
<BR><FONT SIZE=2>cfg_file=/usr/local/nagios/etc/checkcommands.cfg</FONT>
<BR><FONT SIZE=2>cfg_file=/usr/local/nagios/etc/misccommands.cfg</FONT>
<BR><FONT SIZE=2>cfg_file=/usr/local/nagios/etc/contactgroups.cfg</FONT>
<BR><FONT SIZE=2>cfg_file=/usr/local/nagios/etc/contacts.cfg</FONT>
<BR><FONT SIZE=2>cfg_file=/usr/local/nagios/etc/dependencies.cfg</FONT>
<BR><FONT SIZE=2>cfg_file=/usr/local/nagios/etc/escalations.cfg</FONT>
<BR><FONT SIZE=2>cfg_file=/usr/local/nagios/etc/hostgroups.cfg</FONT>
<BR><FONT SIZE=2>cfg_file=/usr/local/nagios/etc/hosts.cfg</FONT>
<BR><FONT SIZE=2>cfg_file=/usr/local/nagios/etc/services.cfg</FONT>
<BR><FONT SIZE=2>cfg_file=/usr/local/nagios/etc/timeperiods.cfg</FONT>
<BR><FONT SIZE=2>resource_file=/usr/local/nagios/etc/resource.cfg</FONT>
<BR><FONT SIZE=2>status_file=/usr/local/nagios/var/status.log</FONT>
<BR><FONT SIZE=2>nagios_user=nagios</FONT>
<BR><FONT SIZE=2>nagios_group=nagios</FONT>
<BR><FONT SIZE=2>check_external_commands=1</FONT>
<BR><FONT SIZE=2>command_check_interval=-1</FONT>
<BR><FONT SIZE=2>command_file=/usr/local/nagios/var/rw/nagios.cmd</FONT>
<BR><FONT SIZE=2>comment_file=/usr/local/nagios/var/comment.log</FONT>
<BR><FONT SIZE=2>downtime_file=/usr/local/nagios/var/downtime.log</FONT>
<BR><FONT SIZE=2>lock_file=/usr/local/nagios/var/nagios.lock</FONT>
<BR><FONT SIZE=2>temp_file=/usr/local/nagios/var/nagios.tmp</FONT>
<BR><FONT SIZE=2>log_rotation_method=d</FONT>
<BR><FONT SIZE=2>log_archive_path=/usr/local/nagios/var/archives</FONT>
<BR><FONT SIZE=2>use_syslog=1</FONT>
<BR><FONT SIZE=2>log_notifications=1</FONT>
<BR><FONT SIZE=2>log_service_retries=1</FONT>
<BR><FONT SIZE=2>log_host_retries=1</FONT>
<BR><FONT SIZE=2>log_event_handlers=1</FONT>
<BR><FONT SIZE=2>log_initial_states=0</FONT>
<BR><FONT SIZE=2>log_external_commands=1</FONT>
<BR><FONT SIZE=2>log_passive_service_checks=1</FONT>
<BR><FONT SIZE=2>inter_check_delay_method=s</FONT>
<BR><FONT SIZE=2>service_interleave_factor=s</FONT>
<BR><FONT SIZE=2>max_concurrent_checks=0</FONT>
<BR><FONT SIZE=2>service_reaper_frequency=10</FONT>
<BR><FONT SIZE=2>sleep_time=1</FONT>
<BR><FONT SIZE=2>service_check_timeout=60</FONT>
<BR><FONT SIZE=2>host_check_timeout=30</FONT>
<BR><FONT SIZE=2>event_handler_timeout=30</FONT>
<BR><FONT SIZE=2>notification_timeout=30</FONT>
<BR><FONT SIZE=2>ocsp_timeout=5</FONT>
<BR><FONT SIZE=2>perfdata_timeout=5</FONT>
<BR><FONT SIZE=2>retain_state_information=1</FONT>
<BR><FONT SIZE=2>state_retention_file=/usr/local/nagios/var/status.sav</FONT>
<BR><FONT SIZE=2>retention_update_interval=60</FONT>
<BR><FONT SIZE=2>use_retained_program_state=0</FONT>
<BR><FONT SIZE=2>interval_length=60</FONT>
<BR><FONT SIZE=2>use_agressive_host_checking=0</FONT>
<BR><FONT SIZE=2>execute_service_checks=1</FONT>
<BR><FONT SIZE=2>accept_passive_service_checks=1</FONT>
<BR><FONT SIZE=2>enable_notifications=1</FONT>
<BR><FONT SIZE=2>enable_event_handlers=1</FONT>
<BR><FONT SIZE=2>process_performance_data=0</FONT>
<BR><FONT SIZE=2>obsess_over_services=0</FONT>
<BR><FONT SIZE=2>check_for_orphaned_services=0</FONT>
<BR><FONT SIZE=2>check_service_freshness=1</FONT>
<BR><FONT SIZE=2>freshness_check_interval=60</FONT>
<BR><FONT SIZE=2>aggregate_status_updates=1</FONT>
<BR><FONT SIZE=2>status_update_interval=15</FONT>
<BR><FONT SIZE=2>enable_flap_detection=0</FONT>
<BR><FONT SIZE=2>low_service_flap_threshold=5.0</FONT>
<BR><FONT SIZE=2>high_service_flap_threshold=20.0</FONT>
<BR><FONT SIZE=2>low_host_flap_threshold=5.0</FONT>
<BR><FONT SIZE=2>high_host_flap_threshold=20.0</FONT>
<BR><FONT SIZE=2>date_format=euro</FONT>
<BR><FONT SIZE=2>illegal_object_name_chars=`~!$%^&*|'"<>?,()=</FONT>
<BR><FONT SIZE=2>illegal_macro_output_chars=`~$&|'"<></FONT>
<BR><FONT SIZE=2>admin_email=nagios</FONT>
<BR><FONT SIZE=2>admin_pager=pagenagios</FONT>
</P>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>

<P><FONT SIZE=2>-----Original Message-----</FONT>
<BR><FONT SIZE=2>From: Chris Fairbanks [<A HREF="mailto:ChrisF@winterlink.net">mailto:ChrisF@winterlink.net</A>]</FONT>
<BR><FONT SIZE=2>Sent: 06 December 2002 07:22</FONT>
<BR><FONT SIZE=2>To: Chris Fairbanks; wrnash; Potter, G M (Greg); Nagios-users (E-mail)</FONT>
<BR><FONT SIZE=2>Cc: Robertson, Brown</FONT>
<BR><FONT SIZE=2>Subject: RE: [Nagios-users] RE: Permissions Error</FONT>
</P>
<BR>

<P><FONT SIZE=2>Another interesting tibit, I tired disabling use_authentication and</FONT>
<BR><FONT SIZE=2>setting up a default user, but I still get the same issues.</FONT>
</P>

<P>        <FONT SIZE=2>Thanks</FONT>
<BR>        <FONT SIZE=2>Chris</FONT>
</P>
<BR>

<P><FONT SIZE=2>-----Original Message-----</FONT>
<BR><FONT SIZE=2>From: Chris Fairbanks </FONT>
<BR><FONT SIZE=2>Sent: Thursday, December 05, 2002 10:47 PM</FONT>
<BR><FONT SIZE=2>To: wrnash; Potter, G M (Greg); Nagios-users (E-mail)</FONT>
<BR><FONT SIZE=2>Cc: Robertson, Brown</FONT>
<BR><FONT SIZE=2>Subject: RE: [Nagios-users] RE: Permissions Error</FONT>
</P>
<BR>

<P><FONT SIZE=2>My httpasswd.users file and everything is setup totally correctly and</FONT>
<BR><FONT SIZE=2>use_authentication=1 is set.  I have also tried setting all the</FONT>
<BR><FONT SIZE=2>authorized_for's = * but to no avail.  From the sounds of it, it looks</FONT>
<BR><FONT SIZE=2>like this might be an issue with RH8.0 or Apache 2.0.40 that ships</FONT>
<BR><FONT SIZE=2>default with RH8.0.  Is there anyone on this list that has Nagios</FONT>
<BR><FONT SIZE=2>working on RH8.0?</FONT>
</P>

<P>        <FONT SIZE=2>Thanks,</FONT>
<BR>        <FONT SIZE=2>Chris</FONT>
</P>
<BR>

<CODE><FONT SIZE=3><BR>
<BR>
**********************************************************************<BR>
Important:<BR>
This e-mail is intended for the above named person only and should be<BR>
treated as confidential. If this has come to you in error you should take<BR>
no action based on it, nor should you copy or show it to anyone; <BR>
please telephone us immediately.<BR>
**********************************************************************<BR>
</FONT></CODE>
</BODY>
</HTML>