Page 1 of 2

HTTPD Error

Posted: Tue Nov 05, 2013 11:02 am
by BanditBBS
Applying Config or Writing files has started taking forever and I now see this in the error log:

Code: Select all

[Tue Nov 05 10:55:08 2013] [error] [client 10.94.5.238] PHP Warning:  chmod(): Operation not permitted in /usr/local/nagiosxi/html/includes/components/ccm/classes/config_class.php on line 850, referer: http://svwdcnagios02/nagiosxi//includes/components/ccm/?cmd=apply
Any ideas?

Re: HTTPD Error

Posted: Tue Nov 05, 2013 11:14 am
by abrist
Is selinux enabled?

Code: Select all

getenforce
Has the nagios user expired?

Code: Select all

chage -l nagios

Re: HTTPD Error

Posted: Tue Nov 05, 2013 11:24 am
by BanditBBS

Code: Select all

[root@svwdcnagios02 ~]# getenforce
Disabled
[root@svwdcnagios02 ~]# chage -l nagios
Last password change                                    : Oct 17, 2012
Password expires                                        : never
Password inactive                                       : never
Account expires                                         : never
Minimum number of days between password change          : 0
Maximum number of days between password change          : 99999
Number of days of warning before password expires       : 7
Its weird, it is not appearing in the log anymore, but applying still is taking 2-4 times longer now. Also the engine is either taking forever to start or not starting and I have to manually start it(sometimes)

Re: HTTPD Error

Posted: Tue Nov 05, 2013 11:30 am
by abrist
Did your sudoers file change?
Lets check the cmdsubsys log - follow the steps on the faq below:
http://support.nagios.com/wiki/index.ph ... n_Problems
PM me the cmd.txt file.

Re: HTTPD Error

Posted: Tue Nov 05, 2013 12:27 pm
by BanditBBS
No change to sudoers and cmd.txt has been sent.

Re: HTTPD Error

Posted: Tue Nov 05, 2013 12:32 pm
by BanditBBS
This is in the file:

Code: Select all

chown: changing ownership of `/var/nagiosramdisk/spool/checkresults/cW1eaeE.ok': Operation not permitted
chown: changing ownership of `/var/nagiosramdisk/spool/checkresults/cW1eaeE': Operation not permitted
chown: changing ownership of `/var/nagiosramdisk/spool/checkresults/cZu6HZK.ok': Operation not permitted
chown: changing ownership of `/var/nagiosramdisk/spool/checkresults/cZu6HZK': Operation not permitted
I have rebooted for the first time since moving to ramdisk. Wonder if something is up with that?

Re: HTTPD Error

Posted: Tue Nov 05, 2013 1:55 pm
by abrist
Lets check the permissions on the ramdisk directories:

Code: Select all

ls -lad /var/nagiosramdisk
ls -lad /var/nagiosramdisk/spool
ls -lad /var/nagiosramdisk/spool/checkresults

Re: HTTPD Error

Posted: Tue Nov 05, 2013 2:04 pm
by BanditBBS

Code: Select all

drwxrwxrwt 4 nagios nagios 160 Nov  5 14:03 /var/nagiosramdisk
drwxrwxr-x 5 nagios nagios 100 Oct 31 12:38 /var/nagiosramdisk/spool
drwxrwxr-x 2 nagios nagios 40 Nov  5 14:03 /var/nagiosramdisk/spool/checkresults

Re: HTTPD Error

Posted: Tue Nov 05, 2013 2:56 pm
by abrist
Those permission look ok. Lets check group mapping:

Code: Select all

grep "apache\|nag" /etc/group

Re: HTTPD Error

Posted: Tue Nov 05, 2013 3:00 pm
by BanditBBS
apache:x:48:
nagios:x:502:nagios,apache,ecsuser
nagcmd:x:503:apache,nagios,ecsuser


Should root be a member of nagios?