RRDtool: /usr/local/rrdtool/bin/rrdtool: Permission denied

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
runlikeanantelope
Cacti User
Posts: 63
Joined: Thu Feb 15, 2007 12:08 pm

RRDtool: /usr/local/rrdtool/bin/rrdtool: Permission denied

Post by runlikeanantelope »

[cactiuser@mikeclx cacti]$ php poller.php
Content-type: text/html
X-Powered-By: PHP/4.3.9

03/05/2007 10:44:37 AM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: /usr/bin/php, ARGS: -q /var/www/html/cacti/cmd.php 0 2]
Waiting on 1/1 pollers.
03/05/2007 10:44:38 AM - POLLER: Poller[0] Parsed MULTI output field '1min:0.37' [map 1min->load_1min]
03/05/2007 10:44:38 AM - POLLER: Poller[0] Parsed MULTI output field '5min:0.11' [map 5min->load_5min]
03/05/2007 10:44:38 AM - POLLER: Poller[0] Parsed MULTI output field '10min:0.05' [map 10min->load_15min]
03/05/2007 10:44:38 AM - POLLER: Poller[0] CACTI2RRD: /usr/local/rrdtool/bin/rrdtool update /var/www/html/cacti/rra/localhost_proc_7.rrd --template proc 1173109477:118
03/05/2007 10:44:38 AM - POLLER: Poller[0] CACTI2RRD: /usr/local/rrdtool/bin/rrdtool update /var/www/html/cacti/rra/localhost_users_6.rrd --template users 1173109477:3
03/05/2007 10:44:38 AM - POLLER: Poller[0] CACTI2RRD: /usr/local/rrdtool/bin/rrdtool update /var/www/html/cacti/rra/localhost_load_1min_5.rrd --template load_1min:load_5min:load_15min 1173109477:0.37:0.11:0.05
03/05/2007 10:44:38 AM - POLLER: Poller[0] CACTI2RRD: /usr/local/rrdtool/bin/rrdtool update /var/www/html/cacti/rra/localhost_mem_swap_4.rrd --template mem_swap 1173109477:1048408
03/05/2007 10:44:38 AM - POLLER: Poller[0] CACTI2RRD: /usr/local/rrdtool/bin/rrdtool update /var/www/html/cacti/rra/localhost_mem_buffers_3.rrd --template mem_buffers 1173109477:3528
OK u:0.00 s:0.00 r:0.03
OK u:0.00 s:0.00 r:0.03
OK u:0.00 s:0.00 r:0.04
OK u:0.00 s:0.00 r:0.04
OK u:0.00 s:0.00 r:0.04
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.


RRDTool Command:

/usr/local/rrdtool/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Localhost - Load Average" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--units-exponent=0 \
--vertical-label="processes in the run queue" \
DEF:a="/var/www/html/cacti/rra/localhost_load_1min_5.rrd":load_1min:AVERAGE \
DEF:b="/var/www/html/cacti/rra/localhost_load_1min_5.rrd":load_5min:AVERAGE \
DEF:c="/var/www/html/cacti/rra/localhost_load_1min_5.rrd":load_15min:AVERAGE \
CDEF:cdefg=TIME,1173109317,GT,a,a,UN,0,a,IF,IF,TIME,1173109317,GT,b,b,UN,0,b,IF,IF,TIME,1173109317,GT,c,c,UN,0,c,IF,IF,+,+ \
AREA:a#EACC00:"1 Minute Average" \
GPRINT:a:LAST:" Current\:%8.2lf\n" \
STACK:b#EA8F00:"5 Minute Average" \
GPRINT:b:LAST:" Current\:%8.2lf\n" \
STACK:c#FF0000:"15 Minute Average" \
GPRINT:c:LAST:"Current\:%8.2lf\n" \
LINE1:cdefg#000000:""

RRDTool Says:

sh: /usr/local/rrdtool/bin/rrdtool: Permission denied
Last edited by runlikeanantelope on Mon Mar 12, 2007 10:30 am, edited 1 time in total.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

The last one indicates, thyt your webserver has not the execute permission for rrdtool. That's bad. You will never see graphs this way
Reinhard
runlikeanantelope
Cacti User
Posts: 63
Joined: Thu Feb 15, 2007 12:08 pm

Post by runlikeanantelope »

Would this be the permissions set on the rrdtool file?
runlikeanantelope
Cacti User
Posts: 63
Joined: Thu Feb 15, 2007 12:08 pm

Post by runlikeanantelope »

[root@mikeclx log]# cd /usr/local/rrdtool/bin
[root@mikeclx bin]# ls -al
total 188
drwxr-xr-x 2 root root 4096 Mar 5 16:50 .
drwxr-xr-x 6 root root 4096 Mar 5 16:50 ..
-rwxr-xr-x 1 root root 36834 Mar 5 16:50 rrdcgi
-rwxr-xr-x 1 root root 4917 Mar 5 16:50 rrdtool
-rwxr-xr-x 1 root root 114200 Mar 5 16:50 rrdupdate

The last 3 spaces, r-x means everyone else has read and execute permissions so what is missing?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

That's fine. Just had a closer look:

Code: Select all

sh: /usr/local/rrdtool/bin/rrdtool: Permission denied
The "sh" is weird. Cacti should call rrdtool via pipe. But I do not have a clue right now
Reinhard
runlikeanantelope
Cacti User
Posts: 63
Joined: Thu Feb 15, 2007 12:08 pm

Post by runlikeanantelope »

Could this error when installing RRDtool be part of my problem:


collect2: ld returned 1 exit status
make[3]: *** [rrdtoolmodule.so] Error 1
make[3]: Leaving directory `/usr/local/src/rrdtool-1.2.19/bindings/python'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/src/rrdtool-1.2.19/bindings'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/rrdtool-1.2.19'
make: *** [all] Error 2
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

I'M not an expert on this, because I installed from rpm. But it seems always insane if make returns errors. Does rrdtool run from cli?
Reinhard
runlikeanantelope
Cacti User
Posts: 63
Joined: Thu Feb 15, 2007 12:08 pm

Post by runlikeanantelope »

I did a complete reinstall. This time, I installed MRTG to make sure RRDtool was working properly and it is. I then installed Cacti, and say message about RRDtool.

[root@localhost bin]# ls -al /usr/local/rrdtool/bin/rrdtool
-rwxr-xr-x 1 root root 4917 Mar 9 11:04 /usr/local/rrdtool/bin/rrdtool

[root@localhost bin]# file /usr/local/rrdtool/bin/rrdtool
/usr/local/rrdtool/bin/rrdtool: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs), not stripped
[root@localhost bin]#

[root@localhost cacti]# ls -al /var/www/html/cacti/rra
total 480
drwxr-xr-x 2 cactiuser users 4096 Mar 9 16:47 .
drwxr-xr-x 11 1000 users 4096 Jan 17 19:23 ..
-rwxr-xr-x 1 root root 94664 Mar 9 16:47 easterly_gw_traffic_in_8.rrd
-rwxr-xr-x 1 root root 141488 Mar 9 16:47 localhost_load_1min_5.rrd
-rwxr-xr-x 1 root root 47840 Mar 9 16:47 localhost_mem_buffers_3.rrd
-rwxr-xr-x 1 root root 47840 Mar 9 16:47 localhost_mem_swap_4.rrd
-rwxr-xr-x 1 root root 47840 Mar 9 16:47 localhost_proc_7.rrd
-rwxr-xr-x 1 root root 47840 Mar 9 16:47 localhost_users_6.rrd
-rw-r--r-- 1 cactiuser users 0 Jan 17 19:23 .placeholder
[root@localhost cacti]# ls -al /var/www/html/cacti/log
total 24
drwxr-xr-x 2 cactiuser users 4096 Jan 17 19:23 .
drwxr-xr-x 11 1000 users 4096 Jan 17 19:23 ..
-rwxr-xr-x 1 cactiuser users 292 Mar 9 16:47 cacti.log
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

What ID is polling, if it's not "root", you will receive permission issues.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
runlikeanantelope
Cacti User
Posts: 63
Joined: Thu Feb 15, 2007 12:08 pm

Post by runlikeanantelope »

I found it definitely has something to do with SELinux. If I disabled the firewall and turn off SELinux, it works fine. I'm still searching for the exact setting that fixes it. When I do, I'll post it for RedHat Cacti users.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests