D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] rsync over ssh permissions

 

Happy New Year

This sounds like a permissions problem rather than anything to do with ssh.

You could create a 'backup' user that has access to the relevant files, and 
rsych login as that, eg@

rsync -r files/ backup@target:/path/

For automated rsync you presumably want to use key login rather than password, 
using ssh-keygen to make the keys. You can then turn password login off for 
the "backup" user.

To clear permission bits you can use eg. Umask 022 in the ssh_config file.

I'm not sure of any of this answers your question.

D

On Wednesday 02 January 2008 15:26:41 Simon Williams wrote:
> Hello everyone (and Happy New Year).
>
> I'm trying to make a backup of my server using rsync over ssh. Direct
> root logins are not permitted on either machine, but this presents a
> problem. I need to have root perms on the server so that I can see all
> the files to backup. But I also need root perms on the machine to which
> the backups are being made so that the ownership of files is preserved.
>
> Any ideas how to overcome this one?
>
> Actually I sometimes have a similar problem with scp, where I want to
> copy a config file or similar from one machine to another, but can't
> because I don't have direct root login.
>
> Is there any way to tell scp, rsync, etc to ssh into the machine and
> then 'su' (asking for the password of course)?
>
> Thanks in advance.
> Simon



-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html