Stephen Gran said: > On Sun, May 29, 2005 at 01:42:32PM -0700, Dennis Peterson said: >> You could try a trivial example by creating a cron job that will fail. >> This can be done by requesting execution of a process that doesn't >> exist. >> >> * * * * * /tmp/junk 2>$1 |/usr/bin/mail -s "this is a test" >> [EMAIL PROTECTED] >> >> If you were to do this professionally you should include the full path >> to >> mail as well as your executable. It's a security thing and failure to do >> so it seen as a rookie mistake. Otherwise it will find the first >> example >> of either somewhere in the system path. It can be real embarrasing when >> somebody has created a script that contains "echo > /etc/passwd" in it >> and >> your cron process finds it because you've not used a fully qualified >> path. > > First, you advise someone to receive 4 empty emails an hour, then you > redirect stderr to the last match in a regular expression, and then you > have a world-writable root $PATH. Then you finish up with comments > about 'rookie mistakes' and an insult towards someone trying to help the > OP.
And I said in the next post this is not the way I'd do it. And you've spoiled the fun that was sure to come in the OP's next question, so let's get right to the issue at hand. The problem of the OP and which has not been addressed by anyone (except me last week) is that many of you people insist on starting or running this stuff as user root. If the OP had created a cronjob for user clamav or whomever the run-as user is the crontab would have truely met the KISS test (another bit of an insult from someone else, eh). Errors would automatically go to user clamav's inbox and that can and arguably should be aliased to the cognizant adminstrator. No need for tests or mail or pipes or redirected stdxxx. Simple. > > Those who live in glass houses and so forth. Can we try to keep a > civil tongue, at least when you have your foot in your mouth? Can I use your response as an example of civility? dp _______________________________________________ http://lurker.clamav.net/list/clamav-users.html
