*BSD News Article 58285


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.mel.connect.com.au!munnari.OZ.AU!spool.mu.edu!howland.reston.ans.net!blackbush.xlink.net!news.dfn.de!fu-berlin.de!zrz.TU-Berlin.DE!zib-berlin.de!news.tu-chemnitz.de!irz401!uriah.heep!news
From: j@uriah.heep.sax.de (J Wunsch)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Continued Crontab Problem on 2.0.5
Date: 6 Jan 1996 18:33:07 GMT
Organization: Private BSD site, Dresden
Lines: 30
Message-ID: <4cmf93$eli@uriah.heep.sax.de>
References: <dhawkDKM3qJ.IHp@netcom.com>
Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch)
NNTP-Posting-Host: localhost.heep.sax.de
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Newsreader: knews 0.9.3

dhawk@netcom.com (David H) writes:
> OK, I'm still trying to figure out crontab. At least I no longer
> have /etc/crontab and /var/cron/tabs/root  ;-)
> 
> But I do have a /var/cron/tabs/stats
> for user 'stats' with a home directory of '/yapp/info/stats'
> and the /var/cron/tabs/stats has
> USER=stats
> HOME=/yapp/info/stats
> LOGNAME=stats
> 
> and it runs a program that writes a configuration file in its
> home directory. The problem is that it keeps trying to write
> to /root instead of /yapp/info/stats even with USER, HOME, and LOGNAME
> set. Why would the stats crontab job think /root is its home
> directory? (The stats crontab file was installed with 
> 	crontab -u stats [filename] 
> by root.)

You should not use relative path names.  Try ${HOME}/foobar.

(I assume cron runs in the home directory of root, instead of cd'ing
into $HOME before.)

-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)