Page 1 of 1
Custom includes cannot upload
Posted: Thu Oct 06, 2016 12:35 pm
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.
Re: Custom includes cannot upload
Posted: Thu Oct 06, 2016 1:42 pm
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
Re: Custom includes cannot upload
Posted: Thu Oct 06, 2016 1:51 pm
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
Re: Custom includes cannot upload
Posted: Thu Oct 06, 2016 1:54 pm
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.
Re: Custom includes cannot upload
Posted: Thu Oct 06, 2016 2:06 pm
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.
Re: Custom includes cannot upload
Posted: Thu Oct 06, 2016 3:03 pm
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.
Re: Custom includes cannot upload
Posted: Thu Oct 06, 2016 3:34 pm
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.