This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Crontab issue


> -----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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]