Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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" To: Subject: RE: Crontab issue Date: Thu, 9 Sep 2004 19:21:12 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit In-Reply-To: <4DE70F2A7A19D511B7EC00D0B77E7C31F13E7D@UBANYEXCH> Message-ID: 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/