Re: rsync from a cron script [SOLVED]

1999-08-19 Thread Michael Stenner
On Wed, Aug 18, 1999 at 08:39:42AM -0400, Michael Stenner wrote:
 I am running rsync from a script that is executed by cron.  It is
 intended to mirror work stuff at home.  It uses my personal accounts
 on both ends (different accounts).
 
 Sadly, rsync returns the following error (and doesn't work :)
 
 Permission denied
 unexpected EOF in read_timeout

Thanks for all of the suggestions.  They ware all very helpful.
As it turns out, I had _SET_ RSYNC_RSH but had not exported it.  I was
looking for this sort of problem but was using set rather than env
and so I didn't see it.  It works nicely now!

Thanks,
 Michael

-- 
  Michael Stenner   Office Phone: 919-660-2513
  Duke University, Dept. of Physics   [EMAIL PROTECTED]
  Box 90305, Durham N.C. 27708-0305


Re: rsync from a cron script [SOLVED]

1999-08-19 Thread Karl F. Larsen

Mike whenever you see Permission denied it means the calling function
lacks the proper ownership to use this funtion. Do some detective work and
find out what user(s) can call rsync. I bet it's just root who can do it.
Make sure cron is acting for root. 

Or I am all wet. That happens a lot...:-)

On Thu, 19 Aug 1999, Michael Stenner wrote:

 On Wed, Aug 18, 1999 at 08:39:42AM -0400, Michael Stenner wrote:
  I am running rsync from a script that is executed by cron.  It is
  intended to mirror work stuff at home.  It uses my personal accounts
  on both ends (different accounts).
  
  Sadly, rsync returns the following error (and doesn't work :)
  
  Permission denied
  unexpected EOF in read_timeout
 
 Thanks for all of the suggestions.  They ware all very helpful.
 As it turns out, I had _SET_ RSYNC_RSH but had not exported it.  I was
 looking for this sort of problem but was using set rather than env
 and so I didn't see it.  It works nicely now!
 
   Thanks,
Michael
 
 -- 
   Michael Stenner Office Phone: 919-660-2513
   Duke University, Dept. of Physics [EMAIL PROTECTED]
   Box 90305, Durham N.C. 27708-0305
 
 
 -- 
 Unsubscribe?  mail -s unsubscribe [EMAIL PROTECTED]  /dev/null
 
 

Best wishes 

 - Karl F. Larsen, [EMAIL PROTECTED]  (505) 524-3303  -


rsync from a cron script

1999-08-18 Thread Michael Stenner
I am running rsync from a script that is executed by cron.  It is
intended to mirror work stuff at home.  It uses my personal accounts
on both ends (different accounts).

Sadly, rsync returns the following error (and doesn't work :)

Permission denied
unexpected EOF in read_timeout

Here's what I've tried:
The script works when executed by hand
I have included the command ssh remotehost date in order to test
that ssh is working from the script (it is) -- yes, I have
RSYNC_RSH set to /usr/bin/rsync

The only thing I can think of is that some environment isn't being
set, but I can't figure out which one.

Any ideas?
Thanks,
 Michael
-- 
  Michael Stenner   Office Phone: 919-660-2513
  Duke University, Dept. of Physics   [EMAIL PROTECTED]
  Box 90305, Durham N.C. 27708-0305


Re: rsync from a cron script

1999-08-18 Thread Heikki Vatiainen
Michael Stenner [EMAIL PROTECTED] wrote:
 I have included the command ssh remotehost date in order to test
   that ssh is working from the script (it is) -- yes, I have
   RSYNC_RSH set to /usr/bin/rsync
  ^
Shouldn't this be ssh, not rsync?

Heikki, hoping to find an easy solution :-)
-- 
Heikki Vatiainen  * [EMAIL PROTECTED]
Tampere University of Technology  * Tampere, Finland



Re: rsync from a cron script

1999-08-18 Thread Chanop Silpa-Anan
What I'm doing with cron script is

#!/bin/sh
rsync -avCuz -e ssh whatever_directory whatever_host:whatever_directory_youwant


that works all the time.

chanop


On Wed, Aug 18, 1999 at 08:39:42AM -0400, Michael Stenner wrote:
 I am running rsync from a script that is executed by cron.  It is
 intended to mirror work stuff at home.  It uses my personal accounts
 on both ends (different accounts).
 
 Sadly, rsync returns the following error (and doesn't work :)
 
 Permission denied
 unexpected EOF in read_timeout
 
 Here's what I've tried:
 The script works when executed by hand
 I have included the command ssh remotehost date in order to test
   that ssh is working from the script (it is) -- yes, I have
   RSYNC_RSH set to /usr/bin/rsync
 
 The only thing I can think of is that some environment isn't being
 set, but I can't figure out which one.
 
 Any ideas?
   Thanks,
Michael
 -- 
   Michael Stenner Office Phone: 919-660-2513
   Duke University, Dept. of Physics [EMAIL PROTECTED]
   Box 90305, Durham N.C. 27708-0305
 
 
 -- 
 Unsubscribe?  mail -s unsubscribe [EMAIL PROTECTED]  /dev/null
 

-- 


 Chanop Silpa-Anan 

 Australian National University.

 Tel. +61 2 6279 8826, +61 2 6279 8837 (office hour)
  +61 2 6249 5240 (home +voice mail)

 ICQ uin 11366301



Re: rsync from a cron script

1999-08-18 Thread Michael Stenner
On Wed, Aug 18, 1999 at 04:24:06PM +0300, Heikki Vatiainen wrote:
 Michael Stenner [EMAIL PROTECTED] wrote:
  I have included the command ssh remotehost date in order to test
  that ssh is working from the script (it is) -- yes, I have
  RSYNC_RSH set to /usr/bin/rsync
 ^
 Shouldn't this be ssh, not rsync?

Doh... Yes, it should, and unfortunately, that IS how it appears in
the script.  I mistyped in the post :)

-Michael
-- 
  Michael Stenner   Office Phone: 919-660-2513
  Duke University, Dept. of Physics   [EMAIL PROTECTED]
  Box 90305, Durham N.C. 27708-0305


Re: rsync from a cron script

1999-08-18 Thread Heikki Vatiainen
Michael Stenner [EMAIL PROTECTED]
 On Wed, Aug 18, 1999 at 04:24:06PM +0300, Heikki Vatiainen wrote:
  Michael Stenner [EMAIL PROTECTED] wrote:
 RSYNC_RSH set to /usr/bin/rsync
  ^
  Shouldn't this be ssh, not rsync?
 
 Doh... Yes, it should, and unfortunately, that IS how it appears in
 the script.  I mistyped in the post :)

Ok, that would have been too easy :) Anyway, since you gave same 
doubts about environment variables, have you tried adding
env ; exit 0 and then comparing the output of the script when 
executed by hand or by cron. Maybe that could give you hints 
about what is different.

// Heikki



Re: rsync from a cron script

1999-08-18 Thread Adam Shand

 I am running rsync from a script that is executed by cron.  It is
 intended to mirror work stuff at home.  It uses my personal accounts on
 both ends (different accounts).
 
 Sadly, rsync returns the following error (and doesn't work :)
 
 Permission denied
 unexpected EOF in read_timeout

i've gotten this for two reasons.  rsync is in a place on the remote server
which isn't in the path (unlikely to be an issue with debian), or your ssh
isn't setup to work passwordless for the user that the script is running as.

you're script sounds similar to one i use to sync my passwd/shadow/group
files between servers and it works fine (though i mostly run it by hand not
from cron).

i would check to make sure that whatever requirements exist for you're
passwordless ssh (~/.shosts, ssh-agent etc) are setup and working for the
user that the cronjob runs as.

sorry i can't be more help.

adam.