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. Fix: configure user's crontab to include PATH like /etc/crontab PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin How-To-Repeat: always
For bugs matching the following conditions: - Status == In Progress - Assignee == "bugs@FreeBSD.org" - Last Modified Year <= 2017 Do - Set Status to "Open"
(In reply to patrick_dkt from comment #0) comment #0 had typo, it should be: PATH=/bin:/sbin:/usr/bin:/usr/sbin (/etc should not be added)