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: Cron only sees local HD mounts

On Sat, 24 Jun 2006, Han Yuan wrote:

> I'm on a windows XP pro based system.  I've been trying to get cron to
> run some scheduled scripts but it unfortunately only is able to
> recognize my locally mounted hds and not the network drives I have
> mapped (c and e are my local drives).
> I have installed cron to run as a service as myself (instead of system).
> I've run all the various utilities, uninstalled, reinstalled several
> times:
> cygrunsrv --stop cron
> cygrunsrv --remove cron
> cygrunsrv --install cron -p /usr/sbin/cron -a -D -e CYGWIN="tty ntsec binmode" -u hyuan
> cygrunsrv --start cron
> I have also googled extensively.  At this point in time, I am at a
> complete loss.  Any help would be appreciated.  Could it be a
> permissions/group issue?  I cannot tell.  I ran 1.10
> and it said all was well. has been known to miss a few cron setup issues,
especially in tricky situations like yours.  In particular, I don't think
it was designed to test installations where cron does not run as SYSTEM
(though that information may be out of date by now).  However, Mark (the
author of usually strives to make it more comprehensive.

> Any wisdom that the group can provide would be MUCH appreciated.  I've
> spent at least 5 hours banging my head on this issue.

>  c:\Program Files\Common Files\Sonic Shared
>  %
>  c:\Program Files\Executive Software\Diskeeper\

There's the '%' in your PATH that looks a bit suspicious.  Not that it
would normally hinder accessing network shares, but something to

> Output from C:\cygwin\bin\id.exe (ntsec)
> UID: 11454(hyuan)        GID: 10513(Domain Users)
> 544(Administrators)      545(Users)               11621(company)
> 11620(corp)              10513(Domain Users)      11203(Eng)
> 13615(qa)                13752(qaall)             11148(Remote Access)
> 14137(Wireless)

That looks fine.

> m:  net NTFS     10240Mb   7% CP CS UN PA FC     Data
> u:  net NTFS      2048Mb   1% CP CS UN PA FC     Users
> x:  net NTFS     10240Mb   7% CP CS UN PA FC     Data
> y:  net            N/A    N/A
> z:  net            N/A    N/A

It would also help to know exactly what your cron script looks like (at
least the part that fails to access the shares.

> Service             : cron
> Current State       : Running
> Controls Accepted   : Stop
> Command             : /usr/sbin/cron -D
> stdin path          : /dev/null
> stdout path         : /var/log/cron.log
> stderr path         : /var/log/cron.log
> Environment         : CYGWIN="tty ntsec binmode"
> Process Type        : Own Process
> Startup             : Automatic
> Account             : MOVARIS\hyuan

This also looks fine -- it seems to authenticate as the right (domain)
user.  One thing to note is that you might want to introduce a dependence
on the "tcpip" service, so that cron doesn't start before that service...
But then it should still work if you restart the service manually.

Another thing to try is adding a 'net use' command (with a password) to
authenticate the cron script to the shares.  I'm not suggesting this as a
permanent solution, but it would help rule out cron authentication issues
vs. other environment issues.  Also, is your machine connected to the
network and to the domain when your cron script runs?
      |\      _,,,---,,_ |
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"

Unsubscribe info:
Problem reports:

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