delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/09/09/14:23:54

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
From: "Dave Korn" <dk AT artimi DOT com>
To: <cygwin AT cygwin DOT com>
Subject: RE: Crontab issue
Date: Thu, 9 Sep 2004 19:21:12 +0100
MIME-Version: 1.0
In-Reply-To: <4DE70F2A7A19D511B7EC00D0B77E7C31F13E7D@UBANYEXCH>
Message-ID: <NUTMEGKtKufVma0osA90000128b@NUTMEG.CAM.ARTIMI.COM>
X-OriginalArrivalTime: 09 Sep 2004 18:21:12.0296 (UTC) FILETIME=[C9334680:01C49699]

> -----Original Message-----
> From: cygwin-owner On Behalf Of Simon.Basyuk
> Sent: 09 September 2004 19:07

> 1. I have no problem with Crontab running cp from local to local;
> 
> 2. I have no problem with running cp from other server to local, from
> command line:
> $ cp -p "/cygdrive/j/Move To Fileshare/bmf70.mdb" "/cygdrive/c"
> 
> 3. the same command DOES NOT work on my local Crontab:
> 59 * * * *  cp -p "/cygdrive/j/Move To Fileshare/bmf70.mdb" 
> "/cygdrive/c"

  So presumably cron is not running under the same user id as you are, and
your username has access perms to the network drive in question, but the
username which cron is running under (probably LocalSystem) doesn't.  In
fact, the very first lines of /usr/share/doc/Cygwin/cron.README say....

-----------------------------------------
This is the Cygwin port of Paul Vixie's cron-3.01. Note that on NT/W2K
it relies on the Cygwin-1.3.2 feature to be able to switch the user
context without password. On NT/W2K run cron under SYSTEM account
as service to use that feature. Note that you don't have access to
net shares in the child processes then.
-----------------------------------------

  Yep, that's it.  Cron is running under the SYSTEM a/c; when it switches to
your identity to run a cron job, it is only impersonating your username
rather than fully logging on as that user ('impersonating' is a technical
term here for when one process assumes the access rights of a second
less-privileged process), and it's just the way windows works that
impersonated user rights are only valid on the local system and not for
logging on to network resources.

  You probably need to run crond under your own identity by installing it
with cygrunsrv and using the -u and -w options.


    cheers, 
      DaveK
-- 
Can't think of a witty .sigline today....


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.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