Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Sat May 27, 2017 5:58 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 47 posts ]  Go to page 1, 2, 3, 4  Next
Author Message
 Post subject: Weathermap permnissions
PostPosted: Fri Jun 19, 2009 5:47 am 
Offline
Cacti User

Joined: Thu Sep 11, 2008 11:48 pm
Posts: 87
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:
simple.conf: Failed to overwrite /usr/share/cacti/plugins/weathermap/output/f972525864990de49157.html - permissions of existing file are wrong?


And

Code:
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 :-)


Top
 Profile  
 
 Post subject: Hi
PostPosted: Fri Jun 19, 2009 5:57 am 
Offline

Joined: Mon Aug 04, 2008 5:08 am
Posts: 23
Location: Cape Town
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 ...


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 19, 2009 6:14 am 
Offline
Cacti User

Joined: Thu Sep 11, 2008 11:48 pm
Posts: 87
Hi,
So in need to change the file permissions to apache and than chmod -R 775 ?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 19, 2009 7:19 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5100
Location: United Kingdom
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 0.2. Superlinks is over there now.
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!)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 19, 2009 9:43 am 
Offline
Cacti User

Joined: Thu Sep 11, 2008 11:48 pm
Posts: 87
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


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 13, 2009 5:24 am 
Offline
Cacti User

Joined: Thu Sep 11, 2008 11:48 pm
Posts: 87
Hi again,

the previous commando

Code:
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:
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:
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


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 13, 2009 5:44 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5100
Location: United Kingdom
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 0.2. Superlinks is over there now.
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!)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 13, 2009 6:38 am 
Offline
Cacti User

Joined: Thu Sep 11, 2008 11:48 pm
Posts: 87
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:
*/5 * * * *     cacti   /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1


The SElinux is set to disable
Code:
# 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.

Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 13, 2009 6:40 am 
Offline
Cacti User

Joined: Thu Sep 11, 2008 11:48 pm
Posts: 87
Sorry something went wrong with the posting..


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 13, 2009 6:44 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5100
Location: United Kingdom
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 0.2. Superlinks is over there now.
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!)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 14, 2009 12:01 am 
Offline
Cacti User

Joined: Thu Sep 11, 2008 11:48 pm
Posts: 87
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:
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]


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 14, 2009 12:27 am 
Offline
Cacti User

Joined: Thu Sep 11, 2008 11:48 pm
Posts: 87
even with the permissions settings at root and 777 config. it still not works.

Still coming witch the same error messages.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 14, 2009 2:29 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5100
Location: United Kingdom
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 0.2. Superlinks is over there now.
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!)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 14, 2009 2:42 am 
Offline
Cacti User

Joined: Thu Sep 11, 2008 11:48 pm
Posts: 87
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.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 14, 2009 3:26 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5100
Location: United Kingdom
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:
-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 0.2. Superlinks is over there now.
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!)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 47 posts ]  Go to page 1, 2, 3, 4  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group