delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/08/29/05:59:09

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Wed, 29 Aug 2001 10:58:21 +0100
From: James Nallen <James DOT Nallen AT may DOT ie>
Subject: Re: unexpected behaviour of 'find' command
In-reply-to: <4.3.1.2.20010828115516.0166b700@pop.ma.ultranet.com>
X-Sender: jnallen AT ailm DOT may DOT ie
To: "Larry Hall (RFK Partners, Inc)" <lhall AT rfk DOT com>
Cc: cygwin AT cygwin DOT com
Message-id: <5.0.2.1.1.20010829105233.01f79d80@ailm.may.ie>
MIME-version: 1.0
X-Mailer: QUALCOMM Windows Eudora Version 5.0.2

At 11:55 28/08/2001 -0400, you wrote:
>At 07:16 AM 8/28/2001, James Nallen wrote:
> >Hi,
> >
> >I'm running cygwin-1.3.2, setup-2.78.2.3 on w2k pro in stand-alone mode.
> >
> >The following file,
> >-rwxr-xr-x    1 Administ None          154 Aug 28 11:43 del_oldfiles.out
> >
> >contains
> >
> >#! /bin/sh
> >rm -f '/home/Administrator/oldfiles.txt'
> >/usr/bin/find.exe /e/work/DBA_Scripts -depth -type f -mtime -4 -exec rm 
> -f {} \;
> >date >> oldfiles.txt
> >
> >
> >When this file is executed from the command shell, it executes as 
> expected. When it is executed from a Cron job, the find command seems to 
> do nothing. Anyone know why this is so?
>
>
>Very likely its because the user running cron is not the same as the user
>running the command interactively.  I suggest checking out some of the
>docs for cron and even inetutils to get a better understanding of some
>of the considerations to run as other users.
>

Thanks for your suggestion. It turns out that the cron service is running 
under the Local System account. I am logged in as the Administrator. The 
drives I want to access were mounted in user mode. The Administrator is not 
the same as the Local System account, therefore when I run the cron job, I 
do not have access to the mounted drives.

I have mounted the drives in system mode, now I get the results that I 
would expect.

Thank you.





>Larry Hall                              lhall AT rfk DOT com
>RFK Partners, Inc.                      http://www.rfk.com
>118 Washington Street                   (508) 893-9779 - RFK Office
>Holliston, MA 01746                     (508) 893-9889 - FAX
>
>
>--
>Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
>Bug reporting:         http://cygwin.com/bugs.html
>Documentation:         http://cygwin.com/docs.html
>FAQ:                   http://cygwin.com/faq/


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019