[ILUG] rsync + switching user after connection
Kieran.Tully AT acm.org
kieran.tully at gmail.com
Tue Nov 16 23:12:30 GMT 2004
On Tue, 16 Nov 2004 22:19:32 +0000, Darragh Bailey
<felix at compsoc.nuigalway.ie> wrote:
> Trying to use rsync to update a local copy of a website from the one sitting on
> a server.
> But in this case I need to be able to switch user after login in order to
> retreive the files fully
> loging in remotely as the shared user will not work either.
> I was looking at
> rsync -var --rsh="ssh -l user host su - new_user" :src_dir/* local_dir/
> But rsync terminates the connection. Is it possible to do it this way, in which
> case could someone point out what I'm missing or do I have to resort to a script
> in order to be able to perform this?
A work-around might be for newuser to clone rsync
somewhere only accessible to user, chmod u+s, then
invoke rsync with --rsync_path=/path/to/setuid/bin/
A better solution would be to set the groups up
"properly" so user can r/w newuser's web files,
but I'm guessing you don't have that option!
I'm also assuming some of your web files are
scripts, so wget is not an option...
Kieran Tully, Software Developer and Tenor
Reply to Kieran.Tully AT acm.org
More information about the ILUG