Generate Nagios config

Support requests, bug reports, questions etc.
Locked
Sway

Generate Nagios config

Post by Sway » Fri Aug 21, 2009 23:58

Error accessing or executing Nagios binary '/usr/local/www/apache22/data/bin/nagios'.
Cannot run the mandatory syntax check.


How to decide a problem?

arlbe1

Re: Generate Nagios config

Post by arlbe1 » Tue Sep 01, 2009 09:49

Hi!

Check that the nagios Binary is executable (chmod +x nagios) and for the webserver-User (Mostly www-data, chown www-data:www-data nagios) readable.

Also look at http://sourceforge.net/apps/mediawiki/n ... _binary.22


Greetings
Strolz Johann

Guest

Re: Generate Nagios config

Post by Guest » Fri Sep 18, 2009 20:04

I vaguely recall something with Apache/PHP when calling commands within included files that the user attempting to run them ends up not being 'apache'. Which requires you to allow any user execute permissions (`chmod +x /usr/local/nagios/bin/nagios`).

Is there a way around this? Could nconf's code be changed so that when it makes system calls with PHP's exec() it actually uses the user Apache is running as? Clearly it would be more secure than allowing any user +x on the Nagios binary.

User avatar
agargiulo
NConf developer
NConf developer
Posts: 725
Joined: Fri Mar 06, 2009 17:50
Location: Zurich, Switzerland
Contact:

Re: Generate Nagios config

Post by agargiulo » Mon Sep 21, 2009 14:56

As far as I know, any executed commands, whether they are included or not, are always run as the "apache" user. Apache/PHP simply start a child process. Unless maybe you have configured something differently in you PHP conf, or are using special modules like PHPSuexec.
Does changing the nagios binary to rwx-r-x-r-x (755) do the trick for you? Who is the owner of the file?

Locked