>Number: 184409 >Category: misc >Synopsis: crontab enviornment 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: >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: _______________________________________________ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"