Page 1 of 2

Unable to Update CCM Global Settings

Posted: Sun Jan 24, 2016 4:52 pm
by grantdoug
We are using non-XI Nagios Core 3.5.1 and Nagios CCM 1.03.

When attempting to update CCM Global Settings using URL, we get the error message "Unable to save to file: /var/www/html/ccm/config/settings.php"

The config.inc file at /var/www/html/ccm seems to be correct:
<?php //config.inc.php
//global configuration options for Nagios CCM
$CFG = array();
if(ENVIRONMENT=='nagiosxi') {
//use XI's generated config
require_once('/usr/local/nagiosxi/etc/components/ccm_config.inc.php');
$CFG['audit_send'] = '/usr/local/nagiosxi/scripts/send_to_auditlog.php';
}
else { //nagioscore
//nagios file locations
$CFG['plugins_directory'] = '/usr/local/nagios/libexec';
$CFG['command_file'] = '/usr/local/nagios/var/rw/nagios.cmd';
$CFG['lock_file'] = '/usr/local/nagios/var/nagios.lock';
$CFG['audit_send'] = '/dev/null';
//mysql database connection info
$CFG['db'] = array(
'server' => 'localhost',
'port' => '3306',
'database' => 'nagiosql',
'username' => 'nagiosql',
'password' => 'n@gweb',
);
}
//misc global settings
$CFG['common']['install'] = 'passed';
$CFG['domain'] = 'localhost';
$CFG['default_pagelimit'] = 15;
$CFG['lock_file'] = '/usr/local/nagios/var/nagios.lock';
$CFG['pear_include'] = '/usr/share/pear/HTML/Template/IT.php';
?>

Re: Unable to Update CCM Global Settings

Posted: Mon Jan 25, 2016 3:09 pm
by hsmith
How do your permissions look?

Code: Select all

ls -l /var/www/html/ccm/config/settings.php

Re: Unable to Update CCM Global Settings

Posted: Thu Jan 28, 2016 11:48 am
by grantdoug
That directory does not exist in our install. Attached an image of what that directory looks like in our install.
CCM directory JHMR
CCM directory JHMR

Re: Unable to Update CCM Global Settings

Posted: Thu Jan 28, 2016 3:14 pm
by jomann
What version of the CCM are you using?

Re: Unable to Update CCM Global Settings

Posted: Thu Jan 28, 2016 3:58 pm
by grantdoug
CCM 1.03, which is shown in the problem description at the ticket header.

Re: Unable to Update CCM Global Settings

Posted: Fri Jan 29, 2016 10:14 am
by rkennedy
What are the permissions on the file?

Code: Select all

ls -l /var/www/html/ccm/config/settings.php

Re: Unable to Update CCM Global Settings

Posted: Fri Jan 29, 2016 2:12 pm
by grantdoug
This does not exist in our install.

Re: Unable to Update CCM Global Settings

Posted: Fri Jan 29, 2016 3:03 pm
by rkennedy
Hm, how about the permissions on the folder entirely?

Code: Select all

ls -l /var/www/html/ccm/config/
Did you follow any kind of instructions when you were setting up that you can link us?

Re: Unable to Update CCM Global Settings

Posted: Sun Jan 31, 2016 10:18 am
by grantdoug
There is no ../html/CCM/Config/ directory in our install. However, I did find a config directory in ../html/nagiosql/. I am going to copy the /config directory to ../html/CCM and see what happens. Listed below are the permissions for that directory. Regarding documentation of the install procedure they used back in 2013, I don't have any.

Contents of ../html/nagiosql directory
Contents of ../html/nagiosql directory
../html/ccm directory
../html/ccm directory
Here are the permissions

ls -l /var/www/html/ccm/config
-rw-r--r-- 1 root root 22735 May 24 2013 fieldvars.php
drwxr-xr-x 10 root root 4096 Jan 31 08:21 locale
-rw-r--r-- 1 root root 9910 May 24 2013 main.css
-rw-r--r-- 1 root root 662 May 24 2013 settings.php

Re: Unable to Update CCM Global Settings

Posted: Mon Feb 01, 2016 5:39 pm
by rkennedy
-rw-r--r-- 1 root root 662 May 24 2013 settings.php
Are these permissions after copying the folder to that directory?
I believe the permissions need to be changed to apache:nagios - can you verify the permissions on sub folders as well too?