Configuration Deployment local

Support requests, bug reports, questions etc.
nashia

Configuration Deployment local

Post by nashia » Mon Aug 13, 2012 15:29

I Updated my Version 1.2.6 to 1.3.0 since this Update I activatet my deployment to local
If I run this:

Code: Select all

expand extract config 	OK	
PHP copy: 	OK	
temporary copy(/srv/www/htdocs/nconf/output/NagiosConfig.tgz, /tmp/NagiosConfig.tgz)
system call 	OK	
gunzip -f /tmp/NagiosConfig.tgz
system call 	OK	
tar -xf /tmp/NagiosConfig.tar -C /tmp/
PHP unlink: 	OK	
remove temporary file(/tmp/NagiosConfig.tar)

Code: Select all

expand copy collector config 	FAILED	
PHP copy: 	FAILED	
recursive copy(/tmp/Default_collector/, /usr/local/icinga/etc/objects/Default_collector)
[/color]

But why?

The right granted to www and wwwrun

:/tmp/global # ll

-rw-r--r-- 1 wwwrun www 10802 13. Aug 15:14 checkcommands.cfg
-rw-r--r-- 1 wwwrun www 1095 13. Aug 15:14 contactgroups.cfg
-rw-r--r-- 1 wwwrun www 5805 13. Aug 15:14 contacts.cfg
-rw-r--r-- 1 wwwrun www 4160 13. Aug 15:14 ...

User avatar
scrat
NConf enthusiast
NConf enthusiast
Posts: 101
Joined: Mon Aug 23, 2010 16:28
Location: Vienna, Austria
Contact:

Re: Configuration Deployment local

Post by scrat » Tue Aug 14, 2012 09:24

Hi,

Does you wwwrun-user have write permissions to /usr/local/icinga/etc/objects and /usr/local/icinga/etc/objects/Default_collector?


Regards,
René

nashia

Re: Configuration Deployment local

Post by nashia » Tue Aug 14, 2012 11:18

Yes, and 775 rights

nashia

Re: Configuration Deployment local

Post by nashia » Tue Aug 21, 2012 10:19

I'm already come further ....
If i change the permission to User and Group icinga i can do this:

Code: Select all

PHP copy: 	OK	

temporary copy(/srv/www/htdocs/nconf/output/NagiosConfig.tgz, /tmp/NagiosConfig.tgz)

system call 	OK	
gunzip -f /tmp/NagiosConfig.tgz

system call 	FAILED	

tar -xf /tmp/NagiosConfig.tar -C /tmp/

tar: global/service_templates.cfg: Cannot open: Permission denied
tar: global/timeperiods.cfg: Cannot open: Permission denied
tar: global/contactgroups.cfg: Cannot open: Permission denied
tar: global/checkcommands.cfg: Cannot open: Permission denied
tar: global/misccommands.cfg: Cannot open: Permission denied
tar: global/host_templates.cfg: Cannot open: Permission denied
tar: global/contacts.cfg: Cannot open: Permission denied
tar: global: Cannot utime: Operation not permitted
tar: Default_collector/service_dependencies.cfg: Cannot open: Permission denied
tar: Default_collector/auto_service_dependencies.cfg: Cannot open: Permission denied
tar: Default_collector/hostgroups.cfg: Cannot open: Permission denied
tar: Default_collector/host_dependencies.cfg: Cannot open: Permission denied
tar: Default_collector/services.cfg: Cannot open: Permission denied
tar: Default_collector/servicegroups.cfg: Cannot open: Permission denied
tar: Default_collector/advanced_services.cfg: Cannot open: Permission denied
tar: Default_collector/hosts.cfg: Cannot open: Permission denied
tar: Default_collector: Cannot utime: Operation not permitted
tar: Exiting with failure status due to previous errors
PHP unlink: 	OK	
 remove temporary file(/tmp/NagiosConfig.tar)

Code: Select all

PHP copy: 	OK	
recursive copy(/tmp/Default_collector/, /usr/local/icinga/etc/objects/Default_collector)
expand copy global config 	OK	

PHP copy: 	OK	
recursive copy(/tmp/global/, /usr/local/icinga/etc/objects/global)
Can i change the User / Group for nconf to icinga??

User avatar
scrat
NConf enthusiast
NConf enthusiast
Posts: 101
Joined: Mon Aug 23, 2010 16:28
Location: Vienna, Austria
Contact:

Re: Configuration Deployment local

Post by scrat » Tue Aug 21, 2012 15:38

Hi,

NConf is running as Apache-User (apache/www-data/...)
You can do the following:
Add apache user to group icinga
make icinga-config writeable for group icinga


Regards,
René

Locked