Weathermap permnissions

Support questions about the Network Weather Map plugin

Moderators: Moderators, Developers

Author
Message
Palermo
Cacti User
Posts: 87
Joined: Thu Sep 11, 2008 11:48 pm

Weathermap permnissions

#1 Post by Palermo » Fri Jun 19, 2009 5:47 am

Hi,
I`m struggling with the permissions of the maps i created.
Does someone knows the correct permissions of the files of the folder en files in the output folder and config folder..

i think i`m close.


I`m getting error like

Code: Select all

simple.conf: Failed to overwrite /usr/share/cacti/plugins/weathermap/output/f972525864990de49157.html - permissions of existing file are wrong?
And

Code: Select all

 WEATHERMAP: Poller[0] WARNING: Output directory (/usr/share/cacti/plugins/weathermap/output) isn't writable (tried to create '/usr/share/cacti/plugins/weathermap/output/weathermap.permissions.test'). No maps created. You probably need to make it writable by the poller process (like you did with the RRA directory) [WMPOLL06]


I cant find a good solution..


Thx :-)

star3am
Posts: 23
Joined: Mon Aug 04, 2008 5:08 am
Location: Cape Town

Hi

#2 Post by star3am » Fri Jun 19, 2009 5:57 am

hallo, the permissions should be that of your web server, you can also make the user cacti part of your apache group, and chmod -R 775 it, should fix it for you ...

Palermo
Cacti User
Posts: 87
Joined: Thu Sep 11, 2008 11:48 pm

#3 Post by Palermo » Fri Jun 19, 2009 6:14 am

Hi,
So in need to change the file permissions to apache and than chmod -R 775 ?

User avatar
Howie
Cacti Guru User
Posts: 5327
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

#4 Post by Howie » Fri Jun 19, 2009 7:19 am

All you actually NEED, is that the output directory, and the files inside it are owned by cactiuser, and writable by that user.

chown -R cactiuser output/
chmod u+w output output/*

You can make life a little nicer with the 'recalculate now' button, by *also* making files owned by group 'apache' (or whatever group your apache user is a member of), and then also making the output directory and files group-writable by that group.

chown -R cactiuser:apache output/
chmod g+w output output/*

That way, both cacti and the web process can overwrite the files.
Weathermap 0.98 is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)

Palermo
Cacti User
Posts: 87
Joined: Thu Sep 11, 2008 11:48 pm

#5 Post by Palermo » Fri Jun 19, 2009 9:43 am

Ok. Thx howie and star3am

chown -R cacti:apache output/
chmod g+w output output/*

did the tric.

it is coming in my manual..

thx again..

Over the hill problem solved

Palermo
Cacti User
Posts: 87
Joined: Thu Sep 11, 2008 11:48 pm

#6 Post by Palermo » Thu Aug 13, 2009 5:24 am

Hi again,

the previous commando

Code: Select all

chown -R cacti:apache output/
chmod g+w output output/*
Work t like a dream. well at least 2 month. Unfortunately
From yesterday it stops working.

The cactilog say this

Code: Select all

08/13/2009 12:10:03 PM - WEATHERMAP: Poller[0] [Map 6] simple.conf: Wrote map to /usr/share/cacti/plugins/weathermap/output/1f986bca203e9fc686c2.png and /usr/share/cacti/plugins/weathermap/output/1f986bca203e9fc686c2.thumb.png
08/13/2009 12:10:03 PM - WEATHERMAP: Poller[0] WARNING: [Map 6] simple.conf: Failed to overwrite existing image file /usr/share/cacti/plugins/weathermap/output/1f986bca203e9fc686c2.png - permissions of existing file are wrong? [WMWARN15]
08/13/2009 12:10:02 PM - WEATHERMAP: Poller[0] [Map 6] simple.conf: About to write image file. If this is the last message in your log, increase memory_limit in php.ini [WMPOLL01]
08/13/2009 12:10:02 PM - WEATHERMAP: Poller[0] [Map 6] simple.conf: Map: /usr/share/cacti/plugins/weathermap/configs/simple.conf -> /usr/share/cacti/plugins/weathermap/output/1f986bca203e9fc686c2.html & /usr/share/cacti/plugins/weathermap/output/1f986bca203e9fc686c2.png 
But i changed nothing in the permissions set or anything.

these are the rights of the directory and the files in the directory

Code: Select all

drwxrwxr-x 2 cacti  apache   4096 2009-08-13 12:15 output

-rw-rw-r-- 1 cacti apache     62 2008-03-19 21:37 index.php
-rw-rw-r-- 1 cacti apache  233002 2009-08-13 09:05 f972525864990de49157.png
-rw-rw-r-- 1 cacti apache    2240 2009-08-13 09:05 f972525864990de49157.html
-rw-rw-r-- 1 cacti apache   22069 2009-08-13 12:15 c3171ffbb43f18e31651.png
-rw-rw-r-- 1 cacti apache    3123 2009-08-13 12:15 c3171ffbb43f18e31651.html
-rw-rw-r-- 1 cacti apache  233021 2009-08-13 12:15 1f986bca203e9fc686c2.png
-rw-rw-r-- 1 cacti apache    2240 2009-08-13 12:15 1f986bca203e9fc686c2.html
What could be the problem.
I`m turing nuts here. I do not believe i can change permissions by it self

User avatar
Howie
Cacti Guru User
Posts: 5327
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

#7 Post by Howie » Thu Aug 13, 2009 5:44 am

OK, well if the permissions haven't changed, maybe the user has... Is the poller still running as the 'cacti' user?

Other than that I can't think what would cause that. Disk full, possibly, but then you wouldn't get logs either. Some kind of SELinux thing?
Weathermap 0.98 is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)

Palermo
Cacti User
Posts: 87
Joined: Thu Sep 11, 2008 11:48 pm

#8 Post by Palermo » Thu Aug 13, 2009 6:38 am

Howie wrote:OK, well if the permissions haven't changed, maybe the user has... Is the poller still running as the 'cacti' user?

Other than that I can't think what would cause that. Disk full, possibly, but then you wouldn't get logs either. Some kind of SELinux thing?
Hi Howie

The cron is still running with under the name of cacti

Code: Select all

*/5 * * * *     cacti   /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1
The SElinux is set to disable

Code: Select all

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#       enforcing - SELinux security policy is enforced.
#       permissive - SELinux prints warnings instead of enforcing.
#       disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
#       targeted - Targeted processes are protected,
#       mls - Multi Level Security protection.
SELINUXTYPE=targeted 
Disk say 37.49G available

I also backup t the config files and the image directory
removed the weathermap dir. and installed a fresh one. Enabled a new simple.conf and it keeps coming with the same error.

I hope i don`t have to install all from scratch.
Last edited by Palermo on Thu Aug 13, 2009 6:41 am, edited 1 time in total.

Palermo
Cacti User
Posts: 87
Joined: Thu Sep 11, 2008 11:48 pm

#9 Post by Palermo » Thu Aug 13, 2009 6:40 am

Sorry something went wrong with the posting..

User avatar
Howie
Cacti Guru User
Posts: 5327
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

#10 Post by Howie » Thu Aug 13, 2009 6:44 am

Looking at those file dates, it seems that it IS updating the files though, isn't it? Do the contents change? (I mean - is the datestamp on the map changing?)
Weathermap 0.98 is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)

Palermo
Cacti User
Posts: 87
Joined: Thu Sep 11, 2008 11:48 pm

#11 Post by Palermo » Fri Aug 14, 2009 12:01 am

Howie wrote:Looking at those file dates, it seems that it IS updating the files though, isn't it? Do the contents change? (I mean - is the datestamp on the map changing?)
Thats correct. the date stamp updates. And the pictures also.
is that strange or what :-)

But no weathermap picture and no thumbnails and keeps coming with the same error in the log.

Code: Select all

08/14/2009 07:00:03 AM - WEATHERMAP: Poller[0] STATS: Weathermap 0.96a run complete - 2 maps were run in 1 seconds with 2 warnings.
08/14/2009 07:00:03 AM - WEATHERMAP: Poller[0] [Map 5] Cacti Test Environment: Wrote map to /usr/share/cacti/plugins/weathermap/output/c3171ffbb43f18e31651.png and /usr/share/cacti/plugins/weathermap/output/c3171ffbb43f18e31651.thumb.png
08/14/2009 07:00:03 AM - WEATHERMAP: Poller[0] WARNING: [Map 5] Cacti Test Environment: Failed to overwrite existing image file /usr/share/cacti/plugins/weathermap/output/c3171ffbb43f18e31651.png - permissions of existing file are wrong? [WMWARN15] 

Palermo
Cacti User
Posts: 87
Joined: Thu Sep 11, 2008 11:48 pm

#12 Post by Palermo » Fri Aug 14, 2009 12:27 am

even with the permissions settings at root and 777 config. it still not works.

Still coming witch the same error messages.

User avatar
Howie
Cacti Guru User
Posts: 5327
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

#13 Post by Howie » Fri Aug 14, 2009 2:29 am

Palermo wrote:Thats correct. the date stamp updates. And the pictures also.
is that strange or what :-)

But no weathermap picture and no thumbnails and keeps coming with the same error in the log. [/code]
Wait, what?

The map picture is updating? So it's working... :-?
Weathermap 0.98 is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)

Palermo
Cacti User
Posts: 87
Joined: Thu Sep 11, 2008 11:48 pm

#14 Post by Palermo » Fri Aug 14, 2009 2:42 am

If you open the file in the map output directly. the map is updated and well. But in cacti if you hit the tab Weathermap you see no tumbnails (in my case be course i have 2 mapes)and no pictures.. if i remove 1 map from the config map. i see a broken picture icon at the top right side in the cacti weathermap tab.

User avatar
Howie
Cacti Guru User
Posts: 5327
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

#15 Post by Howie » Fri Aug 14, 2009 3:26 am

Palermo wrote:If you open the file in the map output directly. the map is updated and well. But in cacti if you hit the tab Weathermap you see no tumbnails (in my case be course i have 2 mapes)and no pictures.. if i remove 1 map from the config map. i see a broken picture icon at the top right side in the cacti weathermap tab.
Hmm, I didn't notice that before. There are no thumbnail files. It should look more like this:

Code: Select all

-rw-r--r-- 1 cactiuser cactiuser  12840 Aug 14 09:21 f44f4eaae97f10360153.html
-rw-r--r-- 1 cactiuser cactiuser 259569 Aug 14 09:21 f44f4eaae97f10360153.png
-rw-r--r-- 1 cactiuser cactiuser  23009 Aug 14 09:21 f44f4eaae97f10360153.thumb.png
-rw-r--r-- 1 cactiuser cactiuser  12889 Aug 14 09:21 f6b367a90c84060ead4f.html
-rw-r--r-- 1 cactiuser cactiuser 249855 Aug 14 09:21 f6b367a90c84060ead4f.png
-rw-r--r-- 1 cactiuser cactiuser  24544 Aug 14 09:21 f6b367a90c84060ead4f.thumb.png
-rw-r--r-- 1 cactiuser cactiuser  21652 Aug 14 09:21 fb7fa01af669ba72f4bc.html
-rw-r--r-- 1 cactiuser cactiuser 253765 Aug 14 09:21 fb7fa01af669ba72f4bc.png
-rw-r--r-- 1 cactiuser cactiuser  28649 Aug 14 09:21 fb7fa01af669ba72f4bc.thumb.png
Have you made any PHP changes lately? The thumbnail generation relies on a particular PHP function that isn't always present. Running check.php should confirm that.
Weathermap 0.98 is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)

Post Reply