Heya All,
I recently whipped up a new CentOS 5.0 machine that has ISPConfig on it (necessary for other things I am doing with it). I followed the steps here to install cacti:
http://www.howtoforge.com/cacti_ispconfig
I now have some issues:
I can log into the site and create devices etc, but my cron job will not run correctly at all...just hangs unless I run it as root. I have tried several things including:
Creating a user for the website under ISPConfig and giving that user ownership of everything
Giving the user 'cacti' ownership of everything
Giving the user 'apache' ownership of everything
I have been testing with the command
su <username> -c php /var/www/web3/web/poller.php
If I run it as root, all is well. If I run it as apache, I get "this account is not currently available". If I run it as the ISPConfig user for the site (web3_<username>) I get "su: /dev/null: permission denied". If I run it as user cacti then I get nothing back...it just hangs forever until I ctrl-c and get "Session terminated, killing shell... ...killed".
Anyone have any idea where I am going wrong?
One note: I did originally install cacti by using 'yum install cacti' but that put it in /var/www/cacti whereas the ISPCconfig wants things in /var/www/web#/web (where web# = the number of the website as created in ISPConfig, e.g. my cacti site is the 3rd site created through ISPConfig so it is web3). I did NOT remove this installation...I just left it as-is and then followed the "10 easy steps" directions to put a new install in the proper directory. I do note that when I look at the 'original' install, root owns everything except rra/ and log/ which are properly owned by the user 'cacti'. When I look at another site created by ISPConfig then the site user owns everything, e.g. web1_<username>, which is why I tried to fix my issues that way.
The cacti log file shows nothing unless I run as root.
Last Issue: When run as root I do get an error from the syslog plugin that permission to the mysql database is denied for user "cactiuser@localhost" so its not picking up the settings in config.php. It is the latest version off Jimmy's excellent cactiusers.org site.
Any help would be GREATLY appreciated. My perfect world would be to remove the 'original' cacti install and get all portions of the new one to run. I'm not a Linux expert by any means.....
I do not think I want the cron job to run as root for security reasons...is this valid or not?
Regards,
Chumley
[SOLVED]Cacti on an ISPConfig using machine...cron won't run
Moderators: Developers, Moderators
-
- Posts: 19
- Joined: Tue Jan 25, 2005 2:17 pm
I had similar issues.
Look at view the contents of /etc/crontab
Then look in your /etc/cron.d/ directory...is there a file there with the <cacti-username>?
I deleted the /etc/cron.d/<cacti-username> file, then edited the /etc/crontab file with:
This also assumes you haven't changed your cron.allow or cron.deny files.
See http://forums.cacti.net/viewtopic.php?t=24435 for further permissions info.
Look at view the contents of /etc/crontab
Then look in your /etc/cron.d/ directory...is there a file there with the <cacti-username>?
I deleted the /etc/cron.d/<cacti-username> file, then edited the /etc/crontab file with:
Code: Select all
*/5 * * * * cacti php /usr/share/cacti/poller.php > /dev/null 2>&1
See http://forums.cacti.net/viewtopic.php?t=24435 for further permissions info.
-
- Posts: 19
- Joined: Tue Jan 25, 2005 2:17 pm
TY for the assistance!
Noflies,
TY for setting me on the right track. I had to:
chmod 755 the rra/ and log/ dirs
take the user cacti and put him in the 'web3' grp (ISPConfig standards here)
make 'web3' the user cacti's home dir (not sure if I had to do this, but I did)
add the line to crontab
A note about crontab....the only entries in there were things like:
01 * * * * root run-parts /etc/cron.hourly
I was modifying entries via webmin....entries which I deleted out and put the standard crontab entry into the file directly. I never did find where webmin was finding the entry that I had modded (I had been modding the entry that was put in by my earlier 'yum install cacti' rpm installation).
So anyway, it is working now and running as user 'cacti', which is cool.
thanks Again!
Chumley
TY for setting me on the right track. I had to:
chmod 755 the rra/ and log/ dirs
take the user cacti and put him in the 'web3' grp (ISPConfig standards here)
make 'web3' the user cacti's home dir (not sure if I had to do this, but I did)
add the line to crontab
A note about crontab....the only entries in there were things like:
01 * * * * root run-parts /etc/cron.hourly
I was modifying entries via webmin....entries which I deleted out and put the standard crontab entry into the file directly. I never did find where webmin was finding the entry that I had modded (I had been modding the entry that was put in by my earlier 'yum install cacti' rpm installation).
So anyway, it is working now and running as user 'cacti', which is cool.
thanks Again!
Chumley
Who is online
Users browsing this forum: No registered users and 6 guests