|
|
| Author |
Message |
Palermo Cacti User
Joined: 11 Sep 2008 Posts: 79
|
Posted: Fri Jun 19, 2009 5:47 am Post subject: Weathermap permnissions |
|
|
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  |
|
| Back to top |
|
 |
star3am
Joined: 04 Aug 2008 Posts: 23 Location: Cape Town
|
Posted: Fri Jun 19, 2009 5:57 am Post subject: Hi |
|
|
| 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 ... |
|
| Back to top |
|
 |
Palermo Cacti User
Joined: 11 Sep 2008 Posts: 79
|
Posted: Fri Jun 19, 2009 6:14 am Post subject: |
|
|
Hi,
So in need to change the file permissions to apache and than chmod -R 775 ? |
|
| Back to top |
|
 |
Howie Cacti Guru User
Joined: 16 Sep 2004 Posts: 3437 Location: United Kingdom
|
Posted: Fri Jun 19, 2009 7:19 am Post subject: |
|
|
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. |
|
| Back to top |
|
 |
Palermo Cacti User
Joined: 11 Sep 2008 Posts: 79
|
Posted: Fri Jun 19, 2009 9:43 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
Palermo Cacti User
Joined: 11 Sep 2008 Posts: 79
|
Posted: Thu Aug 13, 2009 5:24 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
Howie Cacti Guru User
Joined: 16 Sep 2004 Posts: 3437 Location: United Kingdom
|
Posted: Thu Aug 13, 2009 5:44 am Post subject: |
|
|
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? |
|
| Back to top |
|
 |
Palermo Cacti User
Joined: 11 Sep 2008 Posts: 79
|
Posted: Thu Aug 13, 2009 6:38 am Post subject: |
|
|
| 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 |
|
| Back to top |
|
 |
Palermo Cacti User
Joined: 11 Sep 2008 Posts: 79
|
Posted: Thu Aug 13, 2009 6:40 am Post subject: |
|
|
| Sorry something went wrong with the posting.. |
|
| Back to top |
|
 |
Howie Cacti Guru User
Joined: 16 Sep 2004 Posts: 3437 Location: United Kingdom
|
Posted: Thu Aug 13, 2009 6:44 am Post subject: |
|
|
| 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?) |
|
| Back to top |
|
 |
Palermo Cacti User
Joined: 11 Sep 2008 Posts: 79
|
Posted: Fri Aug 14, 2009 12:01 am Post subject: |
|
|
| 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] |
|
|
| Back to top |
|
 |
Palermo Cacti User
Joined: 11 Sep 2008 Posts: 79
|
Posted: Fri Aug 14, 2009 12:27 am Post subject: |
|
|
even with the permissions settings at root and 777 config. it still not works.
Still coming witch the same error messages. |
|
| Back to top |
|
 |
Howie Cacti Guru User
Joined: 16 Sep 2004 Posts: 3437 Location: United Kingdom
|
Posted: Fri Aug 14, 2009 2:29 am Post subject: |
|
|
| 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...  |
|
| Back to top |
|
 |
Palermo Cacti User
Joined: 11 Sep 2008 Posts: 79
|
Posted: Fri Aug 14, 2009 2:42 am Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
Howie Cacti Guru User
Joined: 16 Sep 2004 Posts: 3437 Location: United Kingdom
|
Posted: Fri Aug 14, 2009 3:26 am Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
|