/sbin/service crond unable to start - gives permission error on /usr/sbin/crond
I am running Fedora Core 8 and am unable to start cron through the service command. When I do '/sbin/service start crond' as root, I get a message /usr/sbin/crond: permission denied
If I type /usr/sbin/crond as root, then this turns cron service on which is great. I however get a problem when the box reboots and starts cron while booting. The scripts running on crontab then start giving permission errors on sendmail and mutt and people who are supposed to get notification do not get anything. Does anyone have any clues on what the problem might be? Thanks. |
What's your init.d script for crond look like? Anything change recently?
|
trickykid,
Nothing has changed recently. I just installed this last week but I never had this problem on previous installs of FC8 on the same box. The only thing I can think of I did different was that this time I installed using text-based install and not graphical. Below is init.d script for cron. I have not changed this since installation. #! /bin/bash # # crond Start/Stop the cron clock daemon. # # chkconfig: 2345 90 60 # description: cron is a standard UNIX program that runs user-specified \ # programs at periodic scheduled times. vixie cron adds a \ # number of features to the basic UNIX cron, including better \ # security and more powerful configuration options. # processname: crond # config: /etc/crontab # pidfile: /var/run/crond.pid RETVAL=0 prog="crond" CROND=/usr/sbin/crond LOCK_FILE=/var/lock/subsys/crond # Source function library. . /etc/init.d/functions # set sysconfig settings [ -f /etc/sysconfig/crond ] && . /etc/sysconfig/crond [ -f /etc/sysconfig/crond ] || exit 6 # validate mail t=${CRON_VALIDATE_MAILRCPTS:-UNSET} [ "$t" != "UNSET" ] && export CRON_VALIDATE_MAILRCPTS="$t" prog="crond" start() { echo -n $"Starting $prog: " daemon $prog $CRONDARGS && success || failure RETVAL=$? [ "$RETVAL" = 0 ] && touch $LOCK_FILE echo } stop() { echo -n $"Stopping $prog: " if [ -n "`pidfileofproc $CROND`" ]; then killproc $CROND RETVAL=3 else failure $"Stopping $prog" fi RETVAL=$? [ "$RETVAL" = 0 ] && rm -f $LOCK_FILE echo } reload() { echo -n $"Reloading $prog: " if [ -n "`pidfileofproc $CROND`" ]; then killproc $CROND -HUP else failure $"Reloading $prog" fi RETVAL=$? echo } case "$1" in start) start ;; stop) stop ;; restart) stop start ;; reload) reload ;; status) status $CROND ;; condrestart) if [ -f $LOCK_FILE ]; then if [ "$RETVAL" = 0 ]; then stop sleep 3 start fi fi ;; *) echo $"Usage: $0 {start|stop|status|reload|restart|condrestart}" RETVAL=3 esac exit $RETVAL |
That crond init script matches mine on my FC8 machine. Perhaps a uninstall of crond and reinstall might do the trick. What's the permissions by chance on /usr/sbin/crond and the init.d script? Also, what cron package do you have installed?
rpm -qa | grep cron |
trickykid,
Both scripts have execute permissions and below are the packages installed. Once the box is done executing its scheduled jobs (unfortunately only until sometime tomorrow), I will un-install and re-install cron. Maybe something did not install properly. Thanks a lot for your help! I will keep you posted. [root@antares ~]$ ls -l /usr/sbin/crond -rwxr-xr-x 1 root root 313780 2007-09-24 09:58 /usr/sbin/crond [root@antares nightbuilder]# ls -l /etc/init.d/crond -rwxr-xr-x 1 root root 1750 2007-08-28 06:52 /etc/init.d/crond [root@antares nightbuilder]# rpm -qa | grep cron crontabs-1.10-18.fc8 anacron-2.3-56.fc8 vixie-cron-4.2-3.fc8 cronolog-1.6.2-6.fc8 |
Yeah, I have all those same packages installed myself except the cronolog package.
|
trickykid,
I have unfortunately no update to provide you at this time. I decided against reinstalling crond (using yum) because there were 32 packages dependendencies that would have had to be deleted and I was afraid of opening a can of worms at this point. Also, we are moving to FC9 soon so at this point, the workaround will have to do. The workaround is just to execute /usr/sbin/crond and this starts the daemon (but not persistently) Thanks again. |
All times are GMT -5. The time now is 04:41 PM. |