Permissions Error
Terry Inzauro
tinzauro at axiomintegration.com
Fri Dec 6 16:12:07 CET 2002
I cam across the same error once. If there was a nagios process
running, kill it. If there is a $INSTALLPATH/var/rw/nagios.cmd file,
delete it. Next, start nagios with the /etc/rc.d/init/nagios script.
Then try the request again. If does the same thing. try chmodddddding
the $INSTALLPATH/var/rw/nagios.cmd file for something like 777, then
work it backwards from there.
Terry Inzauro
On Fri, 2002-12-06 at 06:41, Chris Losch wrote:
FYI,
I have just built up a clean install of Redhat 8, and Nagios1.0
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.)
I am recieving the error
Error: Could not stat() command file
'/usr/local/nagios/var/rw/nagios.cmd'!
The external command file may be missing, Nagios may not be
running, and/or Nagios may not be checking external commands.
An error occurred while attempting to commit your command for
processing.
:(
If possible I would suggest you backup the config CGI's (hosts
services etc) and start over, it seems to be easier than
troubleshooting.
Chris... yup another Chris.
Just for reference I've included the bits below so you can cross
reference your config files.
cgi.cfg
-------
authorized_for_system_information=xxxx,nagiosadmin,
authorized_for_system_commands=xxxx,nagiosadmin,
authorized_for_configuration_information=xxxx,nagiosadmin,
authorized_for_all_hosts=xxxx,nagiosadmin,
authorized_for_all_host_commands=xxxx,nagiosadmin,
authorized_for_all_services=xxxx,nagiosadmin,
authorized_for_all_service_commands=xxxx,nagiosadmin,
.htaccess (in /usr/local/nagios/share/ and /usr/local/nagios/sbin/)
---------
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
/usr/local/nagios/etc/htpasswd.users
------------------------------------
nagiosadmin:<encrypted>
/etc/httpd/conf/httpd.conf (added the following, otherwise, no
changes from default)
--------------------------
ScriptAlias /nagios/cgi-bin/ /usr/local/nagios/sbin/
<Directory "/usr/local/nagios/sbin/">
AllowOverride AuthConfig
Options ExecCGI
Order allow,deny
Allow from all
</Directory>
Alias /nagios/ /usr/local/nagios/share/
<Directory "/usr/local/nagios/share">
Options None
AllowOverride AuthConfig
Order allow,deny
Allow from all
</Directory>
/etc/local/nagios/etc/contacts.cfg
----------------------------------
define contact {
contact_name nagiosadmin
alias Nagios Admin
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r
host_notification_options d,u,r
service_notification_commands notify-by-email,notify-by-epager
host_notification_commands
host-notify-by-email,host-notify-by-epager
email nagios-admin at localhost.localdomain
pager
pagenagios-admin at localhost.localdomain
}
/etc/local/nagios/etc/nagios.cfg
---------------------------------
#
# nagios.cfg - Config file for Nagios (www.nagios.org)
#
# Written by Nagat. Manually editing this file is a bad idea since
Nagat will
# overwrite it. Delete the nagatobj.dat file in the nagios/etc
directory to
# reread the Nagios configuration.
#
log_file=/usr/local/nagios/var/nagios.log
cfg_file=/usr/local/nagios/etc/checkcommands.cfg
cfg_file=/usr/local/nagios/etc/misccommands.cfg
cfg_file=/usr/local/nagios/etc/contactgroups.cfg
cfg_file=/usr/local/nagios/etc/contacts.cfg
cfg_file=/usr/local/nagios/etc/dependencies.cfg
cfg_file=/usr/local/nagios/etc/escalations.cfg
cfg_file=/usr/local/nagios/etc/hostgroups.cfg
cfg_file=/usr/local/nagios/etc/hosts.cfg
cfg_file=/usr/local/nagios/etc/services.cfg
cfg_file=/usr/local/nagios/etc/timeperiods.cfg
resource_file=/usr/local/nagios/etc/resource.cfg
status_file=/usr/local/nagios/var/status.log
nagios_user=nagios
nagios_group=nagios
check_external_commands=1
command_check_interval=-1
command_file=/usr/local/nagios/var/rw/nagios.cmd
comment_file=/usr/local/nagios/var/comment.log
downtime_file=/usr/local/nagios/var/downtime.log
lock_file=/usr/local/nagios/var/nagios.lock
temp_file=/usr/local/nagios/var/nagios.tmp
log_rotation_method=d
log_archive_path=/usr/local/nagios/var/archives
use_syslog=1
log_notifications=1
log_service_retries=1
log_host_retries=1
log_event_handlers=1
log_initial_states=0
log_external_commands=1
log_passive_service_checks=1
inter_check_delay_method=s
service_interleave_factor=s
max_concurrent_checks=0
service_reaper_frequency=10
sleep_time=1
service_check_timeout=60
host_check_timeout=30
event_handler_timeout=30
notification_timeout=30
ocsp_timeout=5
perfdata_timeout=5
retain_state_information=1
state_retention_file=/usr/local/nagios/var/status.sav
retention_update_interval=60
use_retained_program_state=0
interval_length=60
use_agressive_host_checking=0
execute_service_checks=1
accept_passive_service_checks=1
enable_notifications=1
enable_event_handlers=1
process_performance_data=0
obsess_over_services=0
check_for_orphaned_services=0
check_service_freshness=1
freshness_check_interval=60
aggregate_status_updates=1
status_update_interval=15
enable_flap_detection=0
low_service_flap_threshold=5.0
high_service_flap_threshold=20.0
low_host_flap_threshold=5.0
high_host_flap_threshold=20.0
date_format=euro
illegal_object_name_chars=`~!$%^&*|'"<>?,()=
illegal_macro_output_chars=`~$&|'"<>
admin_email=nagios
admin_pager=pagenagios
-----Original Message-----
From: Chris Fairbanks [mailto:ChrisF at winterlink.net]
Sent: 06 December 2002 07:22
To: Chris Fairbanks; wrnash; Potter, G M (Greg); Nagios-users
(E-mail)
Cc: Robertson, Brown
Subject: RE: [Nagios-users] RE: Permissions Error
Another interesting tibit, I tired disabling use_authentication and
setting up a default user, but I still get the same issues.
Thanks
Chris
-----Original Message-----
From: Chris Fairbanks
Sent: Thursday, December 05, 2002 10:47 PM
To: wrnash; Potter, G M (Greg); Nagios-users (E-mail)
Cc: Robertson, Brown
Subject: RE: [Nagios-users] RE: Permissions Error
My httpasswd.users file and everything is setup totally correctly
and
use_authentication=1 is set. I have also tried setting all the
authorized_for's = * but to no avail. From the sounds of it, it
looks
like this might be an issue with RH8.0 or Apache 2.0.40 that ships
default with RH8.0. Is there anyone on this list that has Nagios
working on RH8.0?
Thanks,
Chris
**********************************************************************
Important:
This e-mail is intended for the above named person only and should
be
treated as confidential. If this has come to you in error you should
take
no action based on it, nor should you copy or show it to anyone;
please telephone us immediately.
**********************************************************************
Terry Inzauro
Systems Engineer
Email: tinzauro at axiomintegration.com
Phone: 402.345.5500
Fax: 402.345.5501
US Mail: Axiom Integration, Inc.
One Owen Pkwy
2200 Abbott Drive
Carter Lake, IA 51510
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20021206/3540aac1/attachment.html>
More information about the Users
mailing list