From owner-freebsd-questions@FreeBSD.ORG Fri May 11 20:07:04 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 107C916A406 for ; Fri, 11 May 2007 20:07:04 +0000 (UTC) (envelope-from baka.rob@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.169]) by mx1.freebsd.org (Postfix) with ESMTP id 786AE13C43E for ; Fri, 11 May 2007 20:07:02 +0000 (UTC) (envelope-from baka.rob@gmail.com) Received: by ug-out-1314.google.com with SMTP id 71so718203ugh for ; Fri, 11 May 2007 13:07:01 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=dGvU+fWxM2DSvtAOs1r1rwPe+JuDThBgFDZh3/YQzZGuYgY9FbFghUIYGLYsgIjTckLtRzGdSKdBiMwn5xBGkuhDJdaBHjlfg+fWNhs296CcQ0KHODLlniC/vCN8snPyFpnoXeG3XAHYNT+LnGvsmUFdG578TU9BJrPhQRIg1Is= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=GBpujV9KHme7LjTvugyglXUVMkqcEsIbXaw53n5oyK3blNcK86KR5qnBY038UQl+MZdVpcAaVZXfKwwPXqRClI8AXNzl8Qmqb1ku5pIzErBKofu2XhFtvp0lyWwCWo5unqlMuEUHJ0DUk7kfw0WJY5ABuNhkx/zDEhUB+VViJ6w= Received: by 10.67.92.9 with SMTP id u9mr3049679ugl.1178912485668; Fri, 11 May 2007 12:41:25 -0700 (PDT) Received: by 10.67.67.16 with HTTP; Fri, 11 May 2007 12:41:25 -0700 (PDT) Message-ID: Date: Fri, 11 May 2007 14:41:25 -0500 From: "James Anderson" To: "Halid Faith" In-Reply-To: <002001c793fd$a789bfa0$dc96eed5@ihlasnetym> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <002001c793fd$a789bfa0$dc96eed5@ihlasnetym> Cc: freebsd-questions@freebsd.org Subject: Re: Why crontab is not able to run some commands ? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2007 20:07:04 -0000 On 5/11/07, Halid Faith wrote: > > I have a script. As I am a root user, I can run it without a problem. I > added that script to crontab in order to run as automatic. > I entered in /etc/crontab and put down as below; > */20 * * * * root /etc/scriptfile > > Despite root user, the crontab could not run above file. But I can run the > same script in command line interface. Which command are you using to run the script on the command line? Are you just typing out /etc/scriptfile into the shell prompt, or are you running "sh /etc/scriptfile" or running it via some other interpreter? > I am sure tha the crontab daemon is running. Also I can see the crontab try > to run that script in /var/log/cron. > /usr/sbin/cron[98727]: (root) CMD (/etc/scriptfile) Which indication do you have that cron ISN'T running the script? > When I am a different user, I couldn't run the script and I got "access > denied" > What is the problem ? Which file permission does /etc/scriptfile have? (ls -l /etc/scriptfile) Maybe the other user doesn't have read and/or execute permission? Sincerely, -Parker