RRDTool Says /usr/local/bin/: permission denied

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
w3guigui
Posts: 1
Joined: Mon Feb 28, 2005 6:11 am

RRDTool Says /usr/local/bin/: permission denied

Post by w3guigui »

Hello
I installed CACTI in FreeBSD
All seems ok but i have this message

RRDTool Says /usr/local/bin/: permission denied

I don't know why i have this message
Can you help me

Thanks
User avatar
egarnel
Cacti Pro User
Posts: 708
Joined: Thu Nov 21, 2002 8:55 am
Location: Austin, TX

Post by egarnel »

It is self explanitary. the user does not have perms to either run rrdtool or enter into the directory /usr/local/bin

I took a quick look at a default rrdtool install under linux & it had -rwxr-xr-x
which translates to owner read/write/execute; group read/exec & all execute

take a look at the dir perms starting from /usr

haven't played with freeBSD in a while, but perm variables should be the same as linux
pbulteel
Cacti User
Posts: 150
Joined: Fri Sep 05, 2003 9:20 am
Location: London
Contact:

Post by pbulteel »

Hi,

From the message it looks to me like it's trying to RUN /usr/local/bin/ and not an application located there since it doesn't say "/usr/local/bin/rrdtool: permission denied."

I may be wrong, but just in case check under console | settings | paths that all the fields are filled in and that the files specified there exist and are executable by your cacti user.
uname -a
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Settings->Paths->RRDTool. This variable must contain the FULL path including the binary.

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?
alexus
Posts: 40
Joined: Fri Feb 04, 2005 8:38 pm
Location: Brooklyn, New York
Contact:

Post by alexus »

dude

where does it say so?

you most likely didnt setit up right

while you were installing did you specify path to rrdtool?

you need to put /usr/local/rrd-tool/bin/rrdtool or whatever your path is
[url]http://alexus.org/[/url] - [url]http://alexus.biz/[/url] - [url]http://alexus.fm/[/url] - [url]http://lexus.gs/[/url]
bcorn
Posts: 1
Joined: Wed Apr 27, 2005 5:09 pm

Post by bcorn »

Im having the same problem I already checked permissions, even copied and pasted the rddtool command in the manner of

Code: Select all

su - cactiuser -c '/usr/local/rrdtool/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="node10 - Disk Space - /dev/mapper/Vol" \
--rigid \
--base=1024 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bytes" \
DEF:a="/var/www/html/cacti/rra/node10_hdd_free_27.rrd":hdd_used:AVERAGE \
DEF:b="/var/www/html/cacti/rra/node10_hdd_free_27.rrd":hdd_free:AVERAGE \
CDEF:cdefa=a,1024,* \
CDEF:cdefe=b,1024,* \
CDEF:cdefi=TIME,1114639548,GT,a,a,UN,0,a,IF,IF,TIME,1114639548,GT,b,b,UN,0,b,IF,IF,+,1024,* \
AREA:cdefa#F51D30:"Used"  \
GPRINT:cdefa:LAST:"     Current\:%8.2lf %s"  \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:cdefa:MAX:"Maximum\:%8.2lf %s\n"  \
STACK:cdefe#002A97:"Available"  \
GPRINT:cdefe:LAST:"Current\:%8.2lf %s"  \
GPRINT:cdefe:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:cdefe:MAX:"Maximum\:%8.2lf %s\n"  \
LINE2:cdefi#000000:"Total"  \
GPRINT:cdefi:LAST:"    Current\:%8.2lf %s"  \
GPRINT:cdefi:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:cdefi:MAX:"Maximum\:%8.2lf %s\n" 
' > test.png
and that worked.
my file permissions are:

Code: Select all

drwxr-xr-x  15 root root 4096 Apr  4 12:33 /usr
drwxr-xr-x  14 root root 4096 Apr 27 11:55 /usr/local
drwxr-xr-x  10 root root 4096 Apr 27 11:55 /usr/local/rrdtool/
drwxr-xr-x  2 root root 4096 Apr 27 11:55 /usr/local/rrdtool/bin/
-rwxr-xr-x  1 root root 4941 Apr 27 11:55 /usr/local/rrdtool/bin/rrdtool
the webserver runs as apache
the cron job runs as cactiuser

the error messages is

Code: Select all

sh: /usr/local/rrdtool/bin/rrdtool: Permission denied
so it does appear to be an execution problem. I even tried changing the perms to 777.

the system log file says:

Code: Select all

Apr 27 18:15:49 node10 kernel: audit(1114640149.154:0): avc:  denied  { execute } for  pid=25646 exe=/bin/bash name=rrdtool dev=dm-0 ino=721769 scontext=root:system_r:httpd_sys_script_t tcontext=root:object_r:usr_t tclass=file
I hope this isnt information overlode. I know this is a tricky one... I do like the product though. it appears it will be much easier to use than mrtg!
tkouan
Posts: 3
Joined: Mon Nov 28, 2005 10:29 pm

Post by tkouan »

the system log file says:

Code: Select all

Apr 27 18:15:49 node10 kernel: audit(1114640149.154:0): avc:  denied  { execute } for  pid=25646 exe=/bin/bash name=rrdtool dev=dm-0 ino=721769 scontext=root:system_r:httpd_sys_script_t tcontext=root:object_r:usr_t tclass=file
I hope this isnt information overlode. I know this is a tricky one... I do like the product though. it appears it will be much easier to use than mrtg!
Thats SeLinux blocking you. I had the same issue and disabling SeLinux on the machine solved the issue completely.

According to:

http://www.crypt.gen.nz/selinux/disable_selinux.html

To temporarily turn it off:

echo 0 >/selinux/enforce

to permanently:


edit /etc/selinux/config and change the SELINUX line to SELINUX=disabled:

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 - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted

Hope that helps
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests