cacti.log exists but cant' be found

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

Moderators: Developers, Moderators

Post Reply
macboy
Posts: 3
Joined: Mon Feb 16, 2009 8:31 am
Location: London, UK

cacti.log exists but cant' be found

Post by macboy »

Hi,

Running Centos 5 and have been struggling with file not found error on the main cacti page for a few day now:

Cacti Log File Path /var/www/html/cacti/log/cacti.log
[ERROR: FILE NOT FOUND]

The file does exit and is owned by cactiuser / cacti. Did chmod 755 and that did'nt seem to accomplish anything.

Any ideas, help appreciated.


thanks.
Attachments
screen shot of cacti.log file not found.
screen shot of cacti.log file not found.
cacti-log.jpg (134.6 KiB) Viewed 3499 times
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Does the web server have permissions to see the file?
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
macboy
Posts: 3
Joined: Mon Feb 16, 2009 8:31 am
Location: London, UK

Post by macboy »

Hi,

Web Server is Apache 2.2.3 - I don't know how to determine if apache has permissions to see the cacti.log file.

However, I did change the group ownership from cacti to apache on the ../cacti/log directory and ../cacti/log/cacti.log and restarted httpd.

drwxr-xr-x 2 cactiuser apache 61 Feb 16 08:30 log

This didn't change anything. So, changed ownership back to cacti group.

../cacti/
drwxr-xr-x 2 cactiuser cacti 61 Feb 16 08:30 log

../cacti/log/
-rwxr-xr-x 1 cactiuser cacti 0 Jan 26 08:31 cacti.log


Still stuck.


thanks.
Fred
Cacti User
Posts: 81
Joined: Fri Jan 03, 2003 11:43 am

Post by Fred »

macboy wrote:Web Server is Apache 2.2.3 - I don't know how to determine if apache has permissions to see the cacti.log file.
From the command-line, run 'ps aux | grep apache'. The column in the far left is the user that apache runs as. It's usually 'www-data' or 'apache'.

Then, run 'sudo -u apache less /var/www/html/cacti/log/cacti.log'. This will try to view the file as the user 'apache' (substitute www-data or whatever you found in step 1).

You could also be looking at chrooted server.
User avatar
TheWitness
Developer
Posts: 16997
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Code: Select all

chmod -R 777 /var/www/html/cacti/log
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?
macboy
Posts: 3
Joined: Mon Feb 16, 2009 8:31 am
Location: London, UK

Post by macboy »

Thanks, your comments much appreciated.

Firstly, the webserver runs as user apache.

However, can't su into this account -- don't know why, must be some security thing.

Secondly changed file properties with chmod:
drwxrwxrwx 2 cactiuser cacti 67 Feb 18 11:32 log
-rwxrwxrwx 1 cactiuser cacti 0 Jan 26 08:31 cacti.log

This had no effect, file still can't be found.

I did find a .htaccess file in the log directory and deleted that because it had 'Deny from all'. This had no effect either.

I copied the cacti.log file into /var/www/html/cacti and changed the path in the settings; and now the file can be found...
-rwxr-xr-x 1 cactiuser cacti 0 Feb 17 13:08 cacti.log

So, don't know what the problem is. I would like to get cacti working in its vanilla form.

However, if the solution is moving the cacti.log file tis means I'd have to change paths in various config files, firstly I don't know which ones, and secondly am not convinced this is such a great idea.

Am tempted to remove cacti and then re-install, this seems a bit drastic though, becuase all the other files in settings > paths can be seen/found.


More ideas, help appreciated.


Environment is a remote server:
centos 5.1
apache 2.2.3
plesk 8.3
php 5.1.6
perl 4.5.8.8
mysql 5.0.22
net-snmp 1.5.3.1
rrdtool 1.2.29
cacti 0.8.7c
tariox
Posts: 2
Joined: Sun Mar 08, 2009 10:32 am

Post by tariox »

I had the same on a new server.
My problem was PHP Safe Mode. When I turned is off, the file was found, and usable.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests