Web Inject directory permissions issues

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
krobertson71
Posts: 444
Joined: Tue Feb 11, 2014 10:16 pm

Web Inject directory permissions issues

Post by krobertson71 »

I am unable, post upgrade, to edit files in the /usr/local/nagiosxi/etc/components/webinject directory as the Nagios user.

I can create testcases and config files, but once they are written the permissions are apache:nagios 744. So once I create as nagios, the nagios user has read only.

This makes it impossible to go back and edit test cases or if I want to test changing the user-agent.

This all worked fine before the upgrade. Right now I am working around it with the Config Wizard via the GUI. Not being able to edit files after the fact is making my job harder. It also makes it much much hard to test out test cases before deploying them to production as anyone that has used web-inject knows sometimes it can take a few test runs to get everything correct. The new permission makes this impossible as after I create it (Nagios user) I cannot edit it.

Created with Gui. As you can see, if I need to update the user-agent, the nagios user would not have permissions to edit the file the way it did before.

Code: Select all

-rw-r--r-- 1 apache nagios   218 Feb 15 11:55 node.domain.com__Web_Transaction_config.xml
-rw-r--r-- 1 apache nagios   331 Feb 15 11:55 node.domain.com__Web_Transaction_testdata.xml
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Web Inject directory permissions issues

Post by rkennedy »

You should be able to modify small parts by opening up the files as root in the /usr/local/nagiosxi/etc/components/webinject.

I do understand where you're coming from though, and with that, I created a feature request to allow editing the 'Web Transaction' wizard directly through XI (GUI).

The feature request ID is #7764.
Former Nagios Employee
krobertson71
Posts: 444
Joined: Tue Feb 11, 2014 10:16 pm

Re: Web Inject directory permissions issues

Post by krobertson71 »

I guess my question is, why the change? I was able to do this with the Nagios user just fine before the upgrade to Nagios 5.

And just a reminder.... Stop assuming all your users have access to root. Some people do not. Our Linux team holds that key here.
krobertson71
Posts: 444
Joined: Tue Feb 11, 2014 10:16 pm

Re: Web Inject directory permissions issues

Post by krobertson71 »

Other than root any reason why the nagios user permissions have changed in this directory after upgrading?

I don't need to gui to handle this. I would prefer to do this via the filesystem shell as it is much easier. Again, Nagios user was able to perform this prior to the upgrade.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Web Inject directory permissions issues

Post by tmcdonald »

I don't have a great answer for why this was changed, but we've asked the devs for comment and they don't believe they specifically did change them. I know things like umask and potentially security settings can affect the way these are created - did anything like that get changed on your system?
Former Nagios employee
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Web Inject directory permissions issues

Post by rkennedy »

I took a look at a 2014 XI machine -

Code: Select all

[root@localhost components]# ls -l
total 16
-rw-r--r-- 1 apache nagios  644 Sep 16 10:57 ccm_config.inc.php
drwsrwsr-x 2 apache nagios 4096 Feb 16 15:38 webinject
[root@localhost components]# cd webinject/
[root@localhost webinject]# ls -l
total 80
-rw-r--r-- 1 apache nagios   206 Feb 16 15:38 4_3_2_1__Web_Transaction_config.xml
-rw-r--r-- 1 apache nagios    87 Feb 16 15:38 4_3_2_1__Web_Transaction_testdata.xml
-rwsrwsr-x 1 apache nagios 63271 Sep 16 10:49 webinject.pl
[root@localhost webinject]#
On a 5.2.3 XI machine -

Code: Select all

[root@suse11 components]# ls -l
total 12
-rw-r--r-- 1 apache nagios  644 Dec 15  2015 ccm_config.inc.php
-rw-r--r-- 1 apache nagios 3342 Jan  6  2016 _dn_Default Template
drwsrwsr-x 2 apache nagios 4096 Oct  8 00:23 webinject
[root@suse11 components]# cd webinject/
[root@suse11 webinject]# ls -l
total 100
-rw-r--r-- 1 apache nagios   206 Oct  6 23:18 1_2_3_4__Web_Transaction_config.xml
-rw-r--r-- 1 apache nagios    91 Oct  6 23:18 1_2_3_4__Web_Transaction_testdata.xml
I'm not able to replicate this, do you know what the permissions were prior to upgrading?
Former Nagios Employee
krobertson71
Posts: 444
Joined: Tue Feb 11, 2014 10:16 pm

Re: Web Inject directory permissions issues

Post by krobertson71 »

No but that is weird.

But you can close this thread. We just copied out webinjects to the nagios home directory and are creating/testing/updating from there and then moving them over.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Web Inject directory permissions issues

Post by rkennedy »

Sounds good. We did look into this without a great answer. If you need further assistance with this, feel free to open a new thread. I'll close this one out now.
Former Nagios Employee
Locked