From owner-freebsd-questions@FreeBSD.ORG Tue Feb 24 15:33:04 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7047116A4CE for ; Tue, 24 Feb 2004 15:33:04 -0800 (PST) Received: from mxfep01.bredband.com (mxfep01.bredband.com [195.54.107.70]) by mx1.FreeBSD.org (Postfix) with ESMTP id 02B0643D1D for ; Tue, 24 Feb 2004 15:32:59 -0800 (PST) (envelope-from mathias@haas.se) Received: from haas.se ([213.114.148.49] [213.114.148.49]) by mxfep01.bredband.com with SMTP id <20040224233258.EPIF13599.mxfep01.bredband.com@haas.se> for ; Wed, 25 Feb 2004 00:32:58 +0100 Received: (qmail 30905 invoked from network); 24 Feb 2004 23:38:30 -0000 Received: from mathias@haas.se by p3-550.haas.se by uid 82 with qmail-scanner-1.20 (spamassassin: 2.61. Clear:RC:1(192.168.10.10):. Processed: 38:30 -0000 Received: from unknown (HELO haas.se) (192.168.10.10) by: 38:30 -0000 Message-ID: <403BDF2B.8030400@haas.se> Date: Wed, 25 Feb 2004 00:32:59 +0100 From: Mathias Haas User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Julien Gabel References: <51804.193.14.163.194.1077641809.squirrel@mail.haas.se><403B9112.1080503@circlesquared.com><52540.192.168.0.97.1077646240.squirrel@webmail.thilelli.net><403B952C.4060706@haas.se> <403BC43B.6030003@infinitebubble.com> <53781.192.168.0.97.1077659656.squirrel@webmail.thilelli.net> <403BD4F8.40101@haas.se> <54147.192.168.0.97.1077663694.squirrel@webmail.thilelli.net> In-Reply-To: <54147.192.168.0.97.1077663694.squirrel@webmail.thilelli.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-questions@freebsd.org Subject: Re: Shell scripting woes. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: mathias@haas.se List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Feb 2004 23:33:04 -0000 Julien Gabel wrote: >>>The following works fine, here is the detail: >>> >>>$ date ; ls -lF /tmp/test.* >>>Tue Feb 24 22:50:11 CET 2004 >>>-rwxr-x--- 1 jgabel wheel 49 Feb 24 22:50 /tmp/test.bash* >>>$ >>>$ cat /tmp/test.bash >>>#!/usr/local/bin/bash >>>echo start > /tmp/test.txt >>>$ >>>$ crontab -l >>>* * * * * /tmp/test.bash >>>$ >>>$ date ; ls -lF /tmp/test.* >>>Tue Feb 24 22:51:17 CET 2004 >>>-rwxr-x--- 1 jgabel wheel 49 Feb 24 22:46 /tmp/test.bash* >>>-rw-r--r-- 1 jgabel wheel 6 Feb 24 22:51 /tmp/test.txt >>>$ >>>$ cat /tmp/test.txt >>>start >>>$ >>> >>>Can you try *stricly* the same thing? >>> >>> > > > >>Sure (this is run as root): >>$ cd /tmp >>$ date ; ls -lF /tmp/test.* >>Tue Feb 24 23:25:56 CET 2004 >>-rwxr-x--- 1 root wheel 45 Feb 24 23:24 /tmp/test.bash* >>$ >>$ cat test.bash >>#!/usr/local/bin/bash >>echo start > test.txt >> >>$ crontab -l >>* * * * * /usr/local/sbin/pure-ftpwho -w > /www/data/ftpstatus.html >>* * * * * /tmp/test.bash >>$ date ; ls -lF /tmp/test.* >>Tue Feb 24 23:26:08 CET 2004 >>-rwxr-x--- 1 root wheel 45 Feb 24 23:24 /tmp/test.bash* >>$ >> >>Not much of difference I'm afraid. >> >> > >There is a little difference : you are running it as 'root', and >no explicit path is given for "test.txt" in "test.bash". Can you >give us the result of : > > # ls -lF ~root/test.txt > > > Oh my! What stupidity! Of course. I'm afraid sometimes my DOS-roots are revealed... Thanks!