Log Problem with CACTI Version 0.8.8a
Moderators: Developers, Moderators
Log Problem with CACTI Version 0.8.8a
Dear All,
I have installed Cacti from source as shown in Cacti 0.8 Beginner's Guide book. I also installed cacti from yum repository. In the yum repository installation i realized the logs are saved in /var/log/cacti because of a symbolic link in the cacti directory. So i tried to do the same in my "from source installation". I made a backup of the log folder, removed the folder, created a symbolic link to /var/log/cacti, change user and group of /var/log/cacti to apache. After that i got the following error in the apache's error log.
PHP Warning: touch(): Unable to create file /usr/share/cacti/log/cacti.log because Permission denied in /usr/share/cacti/lib/functions.php on line 658
So i change the permisions like this:
ls -l /var/log/cacti/
-rwxrw-r--. 1 apache apache 500387 dic 12 11:40 cacti.log
After that i got an error in the cacti webpage: Error /usr/share/cacti/log/cacti.log is not readable.
But the cacti.log is working. It writes all the logs in the file. I also changed to 777 permision (which is not so secure for me) but it doesn't work. I compare the lib/functions.php file in "from source installation" and "from yum repository". They are the same. I have also tried to read the cacti.log file with the apache user and in fact he can do it.
I would to receive some guidance if it is possible.
Thanks in advance.
I have installed Cacti from source as shown in Cacti 0.8 Beginner's Guide book. I also installed cacti from yum repository. In the yum repository installation i realized the logs are saved in /var/log/cacti because of a symbolic link in the cacti directory. So i tried to do the same in my "from source installation". I made a backup of the log folder, removed the folder, created a symbolic link to /var/log/cacti, change user and group of /var/log/cacti to apache. After that i got the following error in the apache's error log.
PHP Warning: touch(): Unable to create file /usr/share/cacti/log/cacti.log because Permission denied in /usr/share/cacti/lib/functions.php on line 658
So i change the permisions like this:
ls -l /var/log/cacti/
-rwxrw-r--. 1 apache apache 500387 dic 12 11:40 cacti.log
After that i got an error in the cacti webpage: Error /usr/share/cacti/log/cacti.log is not readable.
But the cacti.log is working. It writes all the logs in the file. I also changed to 777 permision (which is not so secure for me) but it doesn't work. I compare the lib/functions.php file in "from source installation" and "from yum repository". They are the same. I have also tried to read the cacti.log file with the apache user and in fact he can do it.
I would to receive some guidance if it is possible.
Thanks in advance.
- Attachments
-
- cacti_error.png (69.94 KiB) Viewed 12727 times
Re: Log Problem with CACTI Version 0.8.8a
I suspect apache can read/write file but cacti has no permissions
-rwxrw-r--. 1 apache apache 500387 dic 12 11:40 cacti.log
Try setting permission to:
-rwxrw-rw-. 1 apache apache 500387 dic 12 11:40 cacti.log
See [1] for more info.
Examples see[2]
so cacti can read and write to the log file.
Cheers Glenn
[1]
http://www.tuxfiles.org/linuxhelp/filepermissions.html
http://www.tuxfiles.org/linuxhelp/fileowner.html
[2] examples
# touch zz
# ll zz
-rw-r--r-- 1 root root 0 Dec 13 17:47 zz
# chmod 644 zz
# ll zz
-rw-r--r-- 1 root root 0 Dec 13 17:47 zz
# chmod 646 zz
# ll zz
-rw-r--rw- 1 root root 0 Dec 13 17:47 zz
-rwxrw-r--. 1 apache apache 500387 dic 12 11:40 cacti.log
Try setting permission to:
-rwxrw-rw-. 1 apache apache 500387 dic 12 11:40 cacti.log
See [1] for more info.
Examples see[2]
so cacti can read and write to the log file.
Cheers Glenn
[1]
http://www.tuxfiles.org/linuxhelp/filepermissions.html
http://www.tuxfiles.org/linuxhelp/fileowner.html
[2] examples
# touch zz
# ll zz
-rw-r--r-- 1 root root 0 Dec 13 17:47 zz
# chmod 644 zz
# ll zz
-rw-r--r-- 1 root root 0 Dec 13 17:47 zz
# chmod 646 zz
# ll zz
-rw-r--rw- 1 root root 0 Dec 13 17:47 zz
Re: Log Problem with CACTI Version 0.8.8a
Dear doiggl,
Thank you so much for your time. I have done what you said, but I'm getting the same error:
-rwxrw-rw-. 1 apache apache 123206946 ene 3 09:26 cacti.log
Error /usr/share/cacti/log/cacti.log is not readable
I found this bug:
http://bugs.cacti.net/print_bug_page.php?bug_id=2222
But it says it was solved in the 0.8.8a version. I have the 0.8.8a version but I'm getting the error. Do you have any idea???
Thank you so much for your time. I have done what you said, but I'm getting the same error:
-rwxrw-rw-. 1 apache apache 123206946 ene 3 09:26 cacti.log
Error /usr/share/cacti/log/cacti.log is not readable
I found this bug:
http://bugs.cacti.net/print_bug_page.php?bug_id=2222
But it says it was solved in the 0.8.8a version. I have the 0.8.8a version but I'm getting the error. Do you have any idea???
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: Log Problem with CACTI Version 0.8.8a
Is SELinux enabled?
R.
R.
Re: Log Problem with CACTI Version 0.8.8a
Thanks gandalf,
was looking at this and couldn't figure it out, looks like I need to add a selinux label to cacti.log to allow httpd process to write.
Not sure if i'm going to bother now
was looking at this and couldn't figure it out, looks like I need to add a selinux label to cacti.log to allow httpd process to write.
Not sure if i'm going to bother now
Joris.
http://www.routerjanitor.com
http://www.routerjanitor.com
- phalek
- Developer
- Posts: 2838
- Joined: Thu Jan 31, 2008 6:39 am
- Location: Kressbronn, Germany
- Contact:
Re: Log Problem with CACTI Version 0.8.8a
THe paths do not match
Maybe you should fix the permissions in /usr/share/cacti/log/cacti.log instead of /var/log/cacti/
?
Code: Select all
So i change the permisions like this:
ls -l /var/log/cacti/
-rwxrw-r--. 1 apache apache 500387 dic 12 11:40 cacti.log
Code: Select all
After that i got an error in the cacti webpage: Error /usr/share/cacti/log/cacti.log is not readable.
?
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Re: Log Problem with CACTI Version 0.8.8a
After doing this commands to resolved the issue of "[NOT FOUND] Cacti Log File Path: The path to your Cacti log file."
touch /usr/share/cacti/log/cacti.log
chown apache:apache /usr/share/cacti/log/cacti.log
chmod 755 /usr/share/cacti/log/cacti.log
I've encountered same issue for Version 0.8.8h
"Error /usr/share/cacti/log/cacti.log is not readable"
Please advise. Thank you very much in advance.
touch /usr/share/cacti/log/cacti.log
chown apache:apache /usr/share/cacti/log/cacti.log
chmod 755 /usr/share/cacti/log/cacti.log
I've encountered same issue for Version 0.8.8h
"Error /usr/share/cacti/log/cacti.log is not readable"
Please advise. Thank you very much in advance.
Re: Log Problem with CACTI Version 0.8.8a
I had the same issue on a new instation of 0.8.8h on CentOS 7. Disabling SElinux solved the issue for me.nullzero wrote:After doing this commands to resolved the issue of "[NOT FOUND] Cacti Log File Path: The path to your Cacti log file."
touch /usr/share/cacti/log/cacti.log
chown apache:apache /usr/share/cacti/log/cacti.log
chmod 755 /usr/share/cacti/log/cacti.log
I've encountered same issue for Version 0.8.8h
"Error /usr/share/cacti/log/cacti.log is not readable"
Please advise. Thank you very much in advance.
Just edit the /etc/sysconfig/selinux and reboot the server.
Who is online
Users browsing this forum: No registered users and 2 guests