Unable to Update CCM Global Settings

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
grantdoug
Posts: 31
Joined: Wed Jan 20, 2016 4:33 pm

Unable to Update CCM Global Settings

Post 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';
?>
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Unable to Update CCM Global Settings

Post by hsmith »

How do your permissions look?

Code: Select all

ls -l /var/www/html/ccm/config/settings.php
Former Nagios Employee.
me.
grantdoug
Posts: 31
Joined: Wed Jan 20, 2016 4:33 pm

Re: Unable to Update CCM Global Settings

Post 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
jomann
Development Lead
Posts: 611
Joined: Mon Apr 22, 2013 10:06 am
Location: Nagios Enterprises

Re: Unable to Update CCM Global Settings

Post by jomann »

What version of the CCM are you using?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
grantdoug
Posts: 31
Joined: Wed Jan 20, 2016 4:33 pm

Re: Unable to Update CCM Global Settings

Post by grantdoug »

CCM 1.03, which is shown in the problem description at the ticket header.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Unable to Update CCM Global Settings

Post by rkennedy »

What are the permissions on the file?

Code: Select all

ls -l /var/www/html/ccm/config/settings.php
Former Nagios Employee
grantdoug
Posts: 31
Joined: Wed Jan 20, 2016 4:33 pm

Re: Unable to Update CCM Global Settings

Post by grantdoug »

This does not exist in our install.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Unable to Update CCM Global Settings

Post 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?
Former Nagios Employee
grantdoug
Posts: 31
Joined: Wed Jan 20, 2016 4:33 pm

Re: Unable to Update CCM Global Settings

Post 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
Attachments
../html/cc
../html/cc
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Unable to Update CCM Global Settings

Post 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?
Former Nagios Employee
Locked