Date: Fri, 11 May 2007 15:03:16 -0500 From: Paul Schmehl <pauls@utdallas.edu> To: freebsd-questions@freebsd.org Subject: Re: Why crontab is not able to run some commands ? 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>
next in thread | previous in thread | raw e-mail | index | archive | help
--==========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 <d.hill@yournetplus.com> 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==========--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?332E8FBDDDFF59A09A61B060>