# Cacti - missing graphs: permission issues [SOLVED]

## Flamie

Hi, I've just spent some hours searching this and many more forums as well as google for a solution.

it started out with the common permission probs on rra/ and log/, those are fixed now.

the poller ddidn't get executed by my cron deamon, I executed it a few times manually and it creates the files.

rra* and log* has 777 permissions for now.

I see that the poller makes the files and updates them when I call it.

I switched on debug mode as suggested and this error I got:

```
RRDTool Says:

 

ERROR: opening '/var/www/localhost/htdocs/cacti/rra/localhost_errors_in_8.rrd': Permission denied
```

I have checked and it has the necessary permissions on the file itself, as well as the subdirectory.

I did: 

```
 # rrdtool info /var/www/localhost/htdocs/cacti/rra/localhost_load_1min_5.rrd
```

it displays sane content such as:

```
filename = "/var/www/localhost/htdocs/cacti/rra/localhost_load_1min_5.rrd"

rrd_version = "0001"

step = 300

last_update = 1107078884

ds[load_1min].type = "GAUGE"

ds[load_1min].minimal_heartbeat = 600

ds[load_1min].min = 0.0000000000e+00

ds[load_1min].max = 5.0000000000e+02

ds[load_1min].last_ds = "UNKN"

ds[load_1min].value = 0.0000000000e+00

ds[load_1min].unknown_sec = 284

```

now I'm stuck, I have been very restrictive with my use variable.

I figured it used png and gd so I added those for the php, mod_php and gd build and rebuilt everything. checked carefully so no other build has a use flag that seem sane to set (jpg however I intentionally skipped).

I still only get "missing image" icons where the graphs are supposed to be.

can anyone help me troubleshoot this?

I'd gladly help out with any information and outputs.

/FlamieLast edited by Flamie on Mon Jan 31, 2005 12:25 pm; edited 1 time in total

----------

## cazze

Hi,

- did you created a cactiuser on you system?

- did you change ownership of the rra/ and log/ directory to the cactiuser (chown -R cactiuser /rra /log)

- did you specified the cactiuser in your crontab to run the poller.php?

look at http://www.cacti.net/downloads/doc/html/install_unix.html for more info.

kammicazze

----------

## Flamie

- did you created a cactiuser on you system?

yes:

```

# useradd cactiuser

# usermod -g cacti -d /home/cactiuser -s /bin/bash cactiuser

```

 - did you change ownership of the rra/ and log/ directory to the cactiuser (chown -R cactiuser /rra /log)

yes:

```

roze cacti # ls -l rra log

log:

total 24

-rw-r--r--  1 cactiuser cacti 22354 Jan 31 12:10 cacti.log

rra:

total 332

-rwxrwxrwx  1 cactiuser cacti 141484 Jan 31 12:10 localhost_load_1min_5.rrd

-rwxrwxrwx  1 cactiuser cacti  47836 Jan 31 12:10 localhost_mem_buffers_3.rrd

-rwxrwxrwx  1 cactiuser cacti  47836 Jan 31 12:10 localhost_mem_swap_4.rrd

-rwxrwxrwx  1 cactiuser cacti  47836 Jan 31 12:10 localhost_proc_7.rrd

-rwxrwxrwx  1 cactiuser cacti  47836 Jan 31 12:10 localhost_users_6.rrd

```

 - did you specified the cactiuser in your crontab to run the poller.php?

no, when I did the tab entry wouldn't run, as of now root runs it. is that a problem?

(the files still are owned by cactiuser/cacti)

```

*/5   * * * *   root    /var/www/localhost/htdocs/cacti/poller.php > /dev/null 2>&1

```

Thanks for the reply, I'm suspicous regarding the permission denied error msg.

as root I've tried su:ing into both cactiuser and apache and tried to read the file, works in both accounts.

what other things could make rrdtool claim permission denied?

----------

## cazze

i don't know if that is the problem, but in my crontab, i have php before the command:

*/5 * * * * cactiuser php /var/www/localhost/htdocs/cacti/poller.php > /dev/null 2>&1

hope it helps,

kammicazze

----------

## Flamie

Greatz! I found it!

I got frustrated so I checked every folder all the way up to the rra folder.

it turned out the rra folder didn't have +x (never occured to me this could be the problem)

Now it's working and I'm going to start looking at all the nice graphs :D

----------

## cazze

Cacti is a great tool!

I've read somewhere to boost mysql performance for cacti, you can change the /etc/mysql/my.cnf file to include the following change:

set-variable = key_buffer=32M

and restart the mysql daeman.

I did this but as i have cacti running for a month now, i don't think i can see the difference already. Could be b*s* also   :Wink: 

kammicazze

----------

## booyaa

Could you please evaluate on your solution here?  +x ? 

I am having an issue where my rrds folder has no data in it.  I may need the same fix

----------

## Flamie

the rrd folder was set with read (r) and write (w) permissions, but not with execute (x), granting execute permissions solved my issue.

----------

