Networking Forums

Networking Forums > Computer Networking > Linux Networking > Cygwin problem with cron and networked drives

Reply
Thread Tools Display Modes

Cygwin problem with cron and networked drives

 
 
ambroze
Guest
Posts: n/a

 
      06-28-2006, 02:54 PM
I have a directory on the network (/cygdrive/f/MD408/out) that is not
recognized when I add a script in cron. If I run this script from the
command line it is recognized.
It's only when it is a mapped network drive (f), it I change it to the
local drive (c) it will work fine.

Here is my cron example:

20 09 * * * exec /cygdrive/c/working/bin/test.sh

Here is the script example of test.sh
-------------------------------------------------------------------
if [ -d /cygdrive/f/MD408/out ];then
echo "Found $outdir"
else
echo "NOT Found $outdir"
fi
-------------------------------------------------------------------

Any thoughts anyone?

 
Reply With Quote
 
 
 
 
Bob Hauck
Guest
Posts: n/a

 
      06-28-2006, 10:36 PM
On 28 Jun 2006 07:54:43 -0700, ambroze <(E-Mail Removed)> wrote:

> I have a directory on the network (/cygdrive/f/MD408/out) that is not
> recognized when I add a script in cron. If I run this script from the
> command line it is recognized.


Sounds like permissions. If this is a system crontab then it won't be
running as you but as Administrator or something.

That said, why do you think this is a Linux question?


--
-| Bob Hauck
-| A proud member of the unhinged moonbat horde.
-| http://www.haucks.org/
 
Reply With Quote
 
ambroze
Guest
Posts: n/a

 
      06-29-2006, 03:49 PM
I've check all of the permissions and I have the cron user running as
my user local account on the network that does have permissions to the
mapped drives and not running as SYSTEM. It still doesn't work. I've
seen this same question numerous times on google but no one knows the
answer.

I posted it here because I can not find a CYGWIN group. If you know of
one please let me know. Thanks.



Bob Hauck wrote:
> On 28 Jun 2006 07:54:43 -0700, ambroze <(E-Mail Removed)> wrote:
>
> > I have a directory on the network (/cygdrive/f/MD408/out) that is not
> > recognized when I add a script in cron. If I run this script from the
> > command line it is recognized.

>
> Sounds like permissions. If this is a system crontab then it won't be
> running as you but as Administrator or something.
>
> That said, why do you think this is a Linux question?
>
>
> --
> -| Bob Hauck
> -| A proud member of the unhinged moonbat horde.
> -| http://www.haucks.org/


 
Reply With Quote
 
Dale Dellutri
Guest
Posts: n/a

 
      06-29-2006, 05:57 PM
On 28 Jun 2006 07:54:43 -0700, ambroze <(E-Mail Removed)> wrote:
> I have a directory on the network (/cygdrive/f/MD408/out) that is not
> recognized when I add a script in cron. If I run this script from the
> command line it is recognized.
> It's only when it is a mapped network drive (f), it I change it to the
> local drive (c) it will work fine.


> Here is my cron example:


> 20 09 * * * exec /cygdrive/c/working/bin/test.sh


> Here is the script example of test.sh
> -------------------------------------------------------------------
> if [ -d /cygdrive/f/MD408/out ];then
> echo "Found $outdir"
> else
> echo "NOT Found $outdir"
> fi
> -------------------------------------------------------------------


> Any thoughts anyone?


Is the command line version that works running on a Linux system or an
MS Windows system?

Is the cron job running on a linux system or an MS Windows system?

Is the mapped network drive /cygrive on a linux system or an
MS Windows system?

Is the connection to the network drive via SMB (SAMBA) or NFS or
something else?

It's impossible to guess the problem without answers to these
questions.

I bet that all of the various systems involved are MS Windows systems
but using Cygwin on the executing system. In this case, you're in
the wrong newsgroup.

Probably the resolution will have something to do with the different
capabilities of the user running the command line version that works,
versus the user running the cron job.

In the future, please give more info.

--
Dale Dellutri <(E-Mail Removed)> (lose the Q's)
 
Reply With Quote
 
ambroze
Guest
Posts: n/a

 
      06-29-2006, 06:53 PM
Yeah, I figured that I was possibly in the wrong group. AGAIN, I cannot
find a group for CYGWIN. I appreciate your attempt to help but if
someone doesn't know anything about the emulator I'm using please don't
reply - especially with comments referring to that fact that I'm in the
wrong group or that I'm not providing enough information. Let me try to
explain again.

I am using CYGWIN (UNIX emulator) installed on a XP machine (for some:
don't say anything about installing a 'real' operating system -
b/c this is what I have to work with) and I have cron installed and
running as a service under my local user account. I have access
permissions to all of the mapped drives. CYGWIN can see the mapped
drives from the command line. BUT, when I run a script that needs one
of the mapped drives that is being called from cron, it cannot find the
mapped drives. This is a problem at my work (where I need it) and we're
on a large network and the same problem exists on my home PC with a
mapped drive to another PC in my home.

Please if you know nothing about CYGWIN, please do not reply. I'm
getting tried of a bunch of smart asses that like to act superior over
others. Just don't click that reply button. Thanks!


Dale Dellutri wrote:
> On 28 Jun 2006 07:54:43 -0700, ambroze <(E-Mail Removed)> wrote:
> > I have a directory on the network (/cygdrive/f/MD408/out) that is not
> > recognized when I add a script in cron. If I run this script from the
> > command line it is recognized.
> > It's only when it is a mapped network drive (f), it I change it to the
> > local drive (c) it will work fine.

>
> > Here is my cron example:

>
> > 20 09 * * * exec /cygdrive/c/working/bin/test.sh

>
> > Here is the script example of test.sh
> > -------------------------------------------------------------------
> > if [ -d /cygdrive/f/MD408/out ];then
> > echo "Found $outdir"
> > else
> > echo "NOT Found $outdir"
> > fi
> > -------------------------------------------------------------------

>
> > Any thoughts anyone?

>
> Is the command line version that works running on a Linux system or an
> MS Windows system?
>
> Is the cron job running on a linux system or an MS Windows system?
>
> Is the mapped network drive /cygrive on a linux system or an
> MS Windows system?
>
> Is the connection to the network drive via SMB (SAMBA) or NFS or
> something else?
>
> It's impossible to guess the problem without answers to these
> questions.
>
> I bet that all of the various systems involved are MS Windows systems
> but using Cygwin on the executing system. In this case, you're in
> the wrong newsgroup.
>
> Probably the resolution will have something to do with the different
> capabilities of the user running the command line version that works,
> versus the user running the cron job.
>
> In the future, please give more info.
>
> --
> Dale Dellutri <(E-Mail Removed)> (lose the Q's)


 
Reply With Quote
 
Dale Dellutri
Guest
Posts: n/a

 
      06-29-2006, 08:39 PM
On 29 Jun 2006 11:53:36 -0700, ambroze <(E-Mail Removed)> wrote:
> Yeah, I figured that I was possibly in the wrong group. AGAIN, I cannot
> find a group for CYGWIN. I appreciate your attempt to help but if
> someone doesn't know anything about the emulator I'm using please don't
> reply - especially with comments referring to that fact that I'm in the
> wrong group or that I'm not providing enough information. Let me try to
> explain again.


> I am using CYGWIN (UNIX emulator) installed on a XP machine (for some:
> don't say anything about installing a 'real' operating system -
> b/c this is what I have to work with) and I have cron installed and
> running as a service under my local user account. I have access
> permissions to all of the mapped drives. CYGWIN can see the mapped
> drives from the command line. BUT, when I run a script that needs one
> of the mapped drives that is being called from cron, it cannot find the
> mapped drives. This is a problem at my work (where I need it) and we're
> on a large network and the same problem exists on my home PC with a
> mapped drive to another PC in my home.


> Please if you know nothing about CYGWIN, please do not reply. I'm
> getting tried of a bunch of smart asses that like to act superior over
> others. Just don't click that reply button. Thanks!


The place to look for answers to this is on the Cygwin mailing list.
You can just read the archives:
http://cygwin.com/ml/cygwin/
or search it using the search function on that page. When I enter
"cron" in the search field the first one I get is titled:
"Cron only sees local HD mounts"
which is your problem.

You can find out about all the Cygwin mailing lists at:
http://cygwin.com/lists.html

You can join the mailing list, but it's high volume.

A person who asks for more info is not a smart ass. If you had
said that you were running Cugwin under WinXP, I would have told
you about the mailing lists without asking any questions.

--
Dale Dellutri <(E-Mail Removed)> (lose the Q's)
 
Reply With Quote
 
 
 
Reply

Thread Tools
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 On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Networked drives disconnect at logoff jcvk Windows Networking 2 06-27-2006 07:04 PM
cygwin CRON problem one1alpha1 Linux Networking 0 01-04-2005 11:36 PM
Deleting old, networked, mapped drives Timothy Lee Windows Networking 0 07-05-2004 06:58 PM
Losing connection to networked drives - XP Pro/Win 2003 SBS Windows Networking 1 06-24-2004 03:55 AM
Cygwin problem with 'cron' and networking rhubarbe Linux Networking 1 08-29-2003 06:59 AM



1 2 3 4 5 6 7 8 9 10 11