delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/01/07/21:29:31

X-Spam-Check-By: sourceware.org
Message-ID: <43C07903.937B681E@dessent.net>
Date: Sat, 07 Jan 2006 18:29:23 -0800
From: Brian Dessent <brian AT dessent DOT net>
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: help cron cygwin
References: <004601c61338$2d332260$ac01a8c0 AT tanhauser>
X-IsSubscribed: yes
Reply-To: cygwin AT cygwin DOT com
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
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id k082TTWw022754

"Christian Lanconelli (servizio)" wrote:

> c:\cvi\ICARO\dati>xcopy c:\cvi\ICARO\dati\??060106.*  \\pc27\CO2_O3\ /D /F
> /Z
> C:\cvi\ICARO\dati\DD060106.GAS -> \\pc27\CO2_O3\DD060106.GAS
> C:\cvi\ICARO\dati\DD060106.MET -> \\pc27\CO2_O3\DD060106.MET
> C:\cvi\ICARO\dati\DD060106.RAD -> \\pc27\CO2_O3\DD060106.RAD
> C:\cvi\ICARO\dati\MN060106.DEU -> \\pc27\CO2_O3\MN060106.DEU
> C:\cvi\ICARO\dati\MN060106.GAS -> \\pc27\CO2_O3\MN060106.GAS
> C:\cvi\ICARO\dati\MN060106.MET -> \\pc27\CO2_O3\MN060106.MET
> C:\cvi\ICARO\dati\MN060106.RAD -> \\pc27\CO2_O3\MN060106.RAD

In addition to what others have said about the PATH setting, if you're
trying to access a non-public network drive in a cronjob you are
probably going to fail.  There is a FAQ entry about this I think. 
Without the user's password, cron can only partially impersonate the
crontab's owner.  This means that network shares that are not public are
not accessible.

The workaround is to explicitly mount the network share (providing the
username and password) with NET USE in the cron job, or run the cron as
the desired user account.  The latter has the drawback of only being
able to run crontabs of that one user since regular user accounts lack
the privileges to switch user context.  Though you might be able to
change this using 'editrights', but the restriction of not being able to
access network shares while impersonating will still exist.

> Bye Bye
> Christian
> BTN Antarctica 74°S - 165°E
> Programma Nazionale di Ricerche in Antartide

Brrrrr... hope you have ample stocks of heavy jackets!

Brian


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