LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] rsync + switching user after connection

[ILUG] rsync + switching user after connection

Michael Conry michael.conry at gmail.com
Wed Nov 17 00:09:29 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.
> 
> 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.

michael



More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


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!
RSS Version
Powered by Dell