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.
>> Normally I can use
>> rsync -vare ssh user at host:src_dir/* local_dir/ --exclude-from=local_dir/EXCL
>> But in this case I need to be able to switch user after login in order to
> retreive the files fully due to permissions, before any one askes its not root,
> but a common website editing account shared between a few members. Additionally
> loging in remotely as the shared user will not work either.
Could you do something like the following: ssh to the remote server to
run the rsync process through sudo (sudo being configured so you can
switch to whatever user is required on the remote host). Or maybe you
could put the required rsync commands (again written so that they are
run on the _remote_ host) in a script on the remote server and make it
suid whatever username is required (but executable only by your own
user account for some security).
The other suggestions (already posted on list by others) regarding
groups/proper-permissions are far better solutions, but it all depends
on what is possible.
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!