Cygwin problem with 'cron' and networking

This is a discussion on Cygwin problem with 'cron' and networking within the Linux Networking forums, part of the Linux Forums category; Hello, I hope I'm on the right group, but I'm running Cygwin, a UNIX environment layout over our ...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-27-2003
rhubarbe
 
Posts: n/a
Default Cygwin problem with 'cron' and networking

Hello,
I hope I'm on the right group, but I'm running Cygwin, a UNIX environment
layout over our Windows 2000 Server.

SETUP DESCRIPTION:
Under Windows, C: and D: are the local drives, whereas I mount E:, F: and
G: as network drives, which are shared directories on other Windows computers.
Under Cygwin, these are automatically mounted under /cygdrive/c/, /cygdrive/d/,
/cygdrive/e/, /cygdrive/f/ and /cygdrive/g/.

PROBLEM:
I made a script that makes an 'ls' of each drive as a test (my main goal is
to 'tar' everything on tape for our backups). The strange thing is if I
run the script manually, it works fine, but when I schedule that same script
as a 'cron' job, it fails to access all network drives (/cygdrive/e/,
/cygdrive/f/ and /cygdrive/g/) and only gives the right output for local c
and d drives.

So instead of giving the ls for the network drives, it outputs something like:
"/dev/nst0: drive not found" (don't remember exact phrasing)
And if I 'cron' the 'tar' script for backups, instead of tar-ing the network
drives, it says:
"/cygdrive/e/: No such file or directory"
"/cygdrive/f/: No such file or directory"
"/cygdrive/g/: No such file or directory",
and then proceeds fine with c and d local drives.

Again, these strange problems only occurs when the jobs are started by 'cron';
everything works perfectly if I manually start the scripts.


Any ideas about how to solve this problem? Our server contains critical data,
and I need to get the backup up and running as soon as possible.

Thanks in advance
Luc
Reply With Quote
  #2 (permalink)  
Old 08-29-2003
Michael C.
 
Posts: n/a
Default Re: Cygwin problem with 'cron' and networking

On 27 Aug 2003 10:19:56 -0700, rhubarbe <rhubarbe0@yahoo.com> wrote:
> Hello,
> I hope I'm on the right group, but I'm running Cygwin, a UNIX environment
> layout over our Windows 2000 Server.
>
> SETUP DESCRIPTION:
> Under Windows, C: and D: are the local drives, whereas I mount E:, F: and
> G: as network drives, which are shared directories on other Windows computers.
> Under Cygwin, these are automatically mounted under /cygdrive/c/, /cygdrive/d/,
> /cygdrive/e/, /cygdrive/f/ and /cygdrive/g/.
>
> PROBLEM:
> I made a script that makes an 'ls' of each drive as a test (my main goal is
> to 'tar' everything on tape for our backups). The strange thing is if I
> run the script manually, it works fine, but when I schedule that same script
> as a 'cron' job, it fails to access all network drives (/cygdrive/e/,
> /cygdrive/f/ and /cygdrive/g/) and only gives the right output for local c
> and d drives.
>
> So instead of giving the ls for the network drives, it outputs something like:
> "/dev/nst0: drive not found" (don't remember exact phrasing)
> And if I 'cron' the 'tar' script for backups, instead of tar-ing the network
> drives, it says:
> "/cygdrive/e/: No such file or directory"
> "/cygdrive/f/: No such file or directory"
> "/cygdrive/g/: No such file or directory",
> and then proceeds fine with c and d local drives.
>
> Again, these strange problems only occurs when the jobs are started by 'cron';
> everything works perfectly if I manually start the scripts.
>
>
> Any ideas about how to solve this problem? Our server contains critical data,
> and I need to get the backup up and running as soon as possible.
>
> Thanks in advance
> Luc


I haven't tried to use cygwin in a while, and never got networking
working with it. However I know a little about Windows and Linux
Networking.

In Windows 2000 shares may be set up by user, I'd guess you have read
access, but the cron job, being run as a different user doesn't have
access to the shares. It's worth investigating anyhow. Sorry I can't
be more help.

GL,

Michael C.
--
mcsuper5@usol.com http://mcsuper5.freeshell.org/
Registered Linux User #303915 http://counter.li.org/


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 04:47 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0