From owner-freebsd-questions@FreeBSD.ORG Fri May 11 20:03:17 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 07ED116A402 for ; Fri, 11 May 2007 20:03:17 +0000 (UTC) (envelope-from pauls@utdallas.edu) Received: from smtp2.utdallas.edu (smtp2.utdallas.edu [129.110.10.33]) by mx1.freebsd.org (Postfix) with ESMTP id DBD8913C44B for ; Fri, 11 May 2007 20:03:16 +0000 (UTC) (envelope-from pauls@utdallas.edu) Received: from utd59514.utdallas.edu (utd59514.utdallas.edu [129.110.3.28]) by smtp2.utdallas.edu (Postfix) with ESMTP id A3DB25EED6 for ; Fri, 11 May 2007 15:03:16 -0500 (CDT) Date: Fri, 11 May 2007 15:03:16 -0500 From: Paul Schmehl To: freebsd-questions@freebsd.org Message-ID: <332E8FBDDDFF59A09A61B060@utd59514.utdallas.edu> In-Reply-To: <20070511194316.N20096@duane.dbq.yournetplus.com> References: <002001c793fd$a789bfa0$dc96eed5@ihlasnetym> <7B18DD5BC0866A3F9B9EC7A3@utd59514.utdallas.edu> <20070511194316.N20096@duane.dbq.yournetplus.com> X-Mailer: Mulberry/4.0.6 (Linux/x86) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=sha1; protocol="application/pkcs7-signature"; boundary="==========DD8658CC1EC4EBC41E6F==========" X-Content-Filtered-By: Mailman/MimeDel 2.1.5 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:03:17 -0000 --==========DD8658CC1EC4EBC41E6F========== Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline --On Friday, May 11, 2007 19:45:22 +0000 Duane Hill=20 wrote: > On Fri, 11 May 2007, Paul Schmehl wrote: > >> >> Then try running this in your cron job: >> /bin/sh /etc/scriptfile >> >> Bet it does work. :-) > > Yes, but if the OP has: > ># !/bin/sh > > as the first line, the file owned by root and the executable flag for > user set, shouldn't it execute from cron as just: > > /etc/scriptfile > > ?? > Yes, but I always like cron jobs to specifically call absolute path to the=20 binary of choice. That way someone couldn't substitute a different binary=20 by altering the path and force a cron job to do something unexpected. --=20 Paul Schmehl (pauls@utdallas.edu) Senior Information Security Analyst The University of Texas at Dallas http://www.utdallas.edu/ir/security/ --==========DD8658CC1EC4EBC41E6F==========--