Custom includes cannot upload

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Custom includes cannot upload

Post by snapon_admin »

I'm getting an error when trying to upload anything to the custom includes component in 5.3. What directories do I need to look at for the permissions for this?

Code: Select all

Could not upload file snapITnoc.png
Verify permissions on upload directories.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Custom includes cannot upload

Post by tgriep »

The 3 subfolders in this folder

Code: Select all

/usr/local/nagiosxi/html/includes/components/custom-includes
Need to have the permissions changed.
Go to that folder and run the following as root.

Code: Select all

chmod 770 images
chmod 770 css
chmod 770 javascript
Be sure to check out our Knowledgebase for helpful articles and solutions!
bwallace
Posts: 1145
Joined: Tue Nov 17, 2015 1:57 pm

Re: Custom includes cannot upload

Post by bwallace »

I had the same problem and can confirm tgriep's suggestion works. Here is what the perms looked like before (non-working)

Code: Select all

[root@XIcent7 custom-includes]# ll
total 32
-rwxr-x--- 1 nagios nagios    55 Oct  6 13:36 CHANGES.txt
drwxr-x--- 2 nagios nagios    34 Oct  6 13:36 css
-rwxr-x--- 1 nagios nagios  3236 Oct  6 13:36 custom-includes.inc.php
drwxr-x--- 2 nagios nagios    34 Oct  6 13:36 images
-rwxr-x--- 1 nagios nagios    97 Oct  6 13:36 install.sh
drwxr-x--- 2 nagios nagios    34 Oct  6 13:36 javascript
-rwxr-x--- 1 nagios nagios 19210 Oct  6 13:36 manage.php

And after...(working)

Code: Select all

[root@XIcent7 custom-includes]# ll
total 32
-rwxr-x--- 1 nagios nagios    55 Oct  6 13:36 CHANGES.txt
drwxrwx--- 2 nagios nagios    34 Oct  6 13:36 css
-rwxr-x--- 1 nagios nagios  3236 Oct  6 13:36 custom-includes.inc.php
drwxrwx--- 2 nagios nagios    34 Oct  6 13:36 images
-rwxr-x--- 1 nagios nagios    97 Oct  6 13:36 install.sh
drwxrwx--- 2 nagios nagios    34 Oct  6 13:36 javascript
-rwxr-x--- 1 nagios nagios 19210 Oct  6 13:36 manage.php
Be sure to check out the Knowledgebase for helpful articles and solutions!
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Re: Custom includes cannot upload

Post by snapon_admin »

Ok cool, that did it, thanks! No how would I use this tool to say, modify the image on the Operations Center to a custom one that I made? I've done it before, but I always forget where that nocscreen file is and I never wrote it down because I figured that would just make too much sense. If I'm understanding this component properly, I should be able to modify that screen now and have it not break on update which will make me go back to customizing it again.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Custom includes cannot upload

Post by tgriep »

The Operations Screens icon is in this folder

Code: Select all

/usr/local/nagiosxi/html/includes/components/opscreen/images
Replace the nagios.png with your icon and refresh the screen to see it on the Operations Screen menu.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Re: Custom includes cannot upload

Post by snapon_admin »

That's for Operations Screen, I was looking for the Operations Center. That is actually located here: /usr/local/nagiosxi/html/includes/components/nocscreen. If I modify that php, though, it is overwritten whenever I update Nagios. Is it possible to use the custom includes component to modify that php and have it persist through updates? I'm assuming that's what the custom includes is for, I may be incorrect in that assumption.
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: Custom includes cannot upload

Post by avandemore »

Custom Includes are for css, javascript, and images. They will not alter PHP.

You can always create a diff file and apply the patch after every update. It's easy enough to automate as well.
Previous Nagios employee
Locked