From nobody@FreeBSD.org  Sun Dec  1 14:10:03 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id EDFF3949
	for <freebsd-gnats-submit@FreeBSD.org>; Sun,  1 Dec 2013 14:10:03 +0000 (UTC)
Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id DA40916BE
	for <freebsd-gnats-submit@FreeBSD.org>; Sun,  1 Dec 2013 14:10:03 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id rB1EA3Rn009310
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 1 Dec 2013 14:10:03 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id rB1EA3nQ009303;
	Sun, 1 Dec 2013 14:10:03 GMT
	(envelope-from nobody)
Message-Id: <201312011410.rB1EA3nQ009303@oldred.freebsd.org>
Date: Sun, 1 Dec 2013 14:10:03 GMT
From: Patrick Dung <patrick_dkt@yahoo.com.hk>
To: freebsd-gnats-submit@FreeBSD.org
Subject: crontab enviornment should include common paths like /sbin or /usr/sbin
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         184409
>Category:       conf
>Synopsis:       [request] crontab(5) environment should include common paths like /sbin or /usr/sbin
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Dec 01 14:20:00 UTC 2013
>Closed-Date:    
>Last-Modified:  Sun May 04 05:14:42 UTC 2014
>Originator:     Patrick Dung
>Release:        FreeBSD 9.2 x64
>Organization:
>Environment:
>Description:
By default, user's crontab would have below environment variables 

LOGNAME=user1
PATH=/usr/bin:/bin
PWD=/usr/home/user1
HOME=/home/user1
USER=user1
SHELL=/bin/sh

When the script is invoked/test in command line, it worked.
When the script is invoked by cronjob, some part of the script failed
to run because /usr/sbin/chown is not in the search PATH.

It is not convenient.
>How-To-Repeat:
always
>Fix:
configure user's crontab to include PATH like /etc/crontab

PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin

>Release-Note:
>Audit-Trail:
>Unformatted:
