[12.04] crontab -e is not showing PATH in the example, so the example with tar will fail

Bug #1148594 reported by Michael Basse
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cron (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

crontab -e is showing

#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').#
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
#
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
#
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
#
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h dom mon dow command

There is no line with PATH but in the example tar is used (instead of /bin/tar), so the example should be include PATH or /bin/tar instead of tar

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: cron 3.0pl1-120ubuntu4
ProcVersionSignature: Ubuntu 3.2.0-38.61-generic 3.2.37
Uname: Linux 3.2.0-38-generic x86_64
ApportVersion: 2.0.1-0ubuntu17.1
Architecture: amd64
Date: Wed Mar 6 06:01:04 2013
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
MarkForUpload: True
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
SourcePackage: cron
UpgradeStatus: Upgraded to precise on 2013-01-15 (49 days ago)

Revision history for this message
Michael Basse (michael-alpha-unix) wrote :
Revision history for this message
Michael Basse (michael-alpha-unix) wrote :
Revision history for this message
Christian Kastner (ckk) wrote :

The man page for crontab(5) states that PATH is initialized with /usr/bin:/bin, so the tar invocation in the example is correct. Or did I misunderstand your question?

Revision history for this message
Michael Basse (michael-alpha-unix) wrote :

Hi Christian,
i think it was my fault. I thought that the PATH should be in the file crontab -e is editing. As it seems cron itself is using the path somewhere because its definitely on in the crontab -e file

Revision history for this message
Christian Kastner (ckk) wrote :

OK, closing then. Thank you for your quick reply!

Changed in cron (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.