LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 07-15-2008, 01:01 PM   #1
mgervacio
LQ Newbie
 
Registered: Jul 2008
Location: New Jersey
Distribution: Fedora Core 8
Posts: 8

Rep: Reputation: 0
/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.
 
Old 07-15-2008, 01:11 PM   #2
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
What's your init.d script for crond look like? Anything change recently?
 
Old 07-15-2008, 02:17 PM   #3
mgervacio
LQ Newbie
 
Registered: Jul 2008
Location: New Jersey
Distribution: Fedora Core 8
Posts: 8

Original Poster
Rep: Reputation: 0
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
 
Old 07-15-2008, 03:07 PM   #4
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
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
 
Old 07-15-2008, 03:39 PM   #5
mgervacio
LQ Newbie
 
Registered: Jul 2008
Location: New Jersey
Distribution: Fedora Core 8
Posts: 8

Original Poster
Rep: Reputation: 0
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
 
Old 07-15-2008, 04:03 PM   #6
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
Yeah, I have all those same packages installed myself except the cronolog package.
 
Old 07-16-2008, 01:03 PM   #7
mgervacio
LQ Newbie
 
Registered: Jul 2008
Location: New Jersey
Distribution: Fedora Core 8
Posts: 8

Original Poster
Rep: Reputation: 0
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Permission denied at /usr/sbin/ndiswrapper-1.9 line 152. CrinkElite Linux - Newbie 4 11-18-2007 06:53 PM
How do you change what the /usr/sbin/service program runs? launchcode Red Hat 3 07-16-2004 01:18 PM
/usr/sbin and /sbin world read/executable... why? lazlow69 Slackware 3 04-29-2004 05:06 PM
As root, not seeing /sbin and /usr/sbin in path weghman Linux - Newbie 3 04-25-2004 01:06 PM
/usr/sbin/dns-keygen; permission denied da_kidd_er Linux - Software 1 02-27-2003 04:30 AM


All times are GMT -5. The time now is 09:14 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration