preserving perms/owner with scp?

Net Llama! netllama
Mon May 17 12:02:13 PDT 2004


On 05/10/04 17:36, Bill Campbell wrote:
> On Mon, May 10, 2004, Net Llama! wrote:
> 
>>On 05/10/04 16:21, Kurt Wall wrote:
>>
>>>In a 0.4K blaze of typing glory, Net Llama! wrote:
>>>
>>>
>>>>Anyone know of a way to preserve permissions & ownership when moving files
>>>>with scp?
>>>
>>>
>>>scp -p 
>>>
>>>Kurt
>>
>>hrmmm, tried scp'ing files that were owned by another user as root. 
>>they ended up being owned by root.  am i missing something?
> 
> 
> Does the other user exist on the target system?

When i tested this, i did it on one system.  I just let root scp files 
owned by user 'netllama' from ~nellama to ~root, and root owned 
everything.  Ultimately i need to do this between two boxes, but i 
wanted to test it first so that I didn't end up with an entire 
filesystem owned by root.

> 
> Rsync will also handle this, and often more efficiently as it
> only has to copy things that have changed (and those using a
> binary diff technique that minimizes bandwidth).

Is rsync any more likely to preserve perms & ownership?


-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
L. Friedman                       	       netllama at linux-sxs.org
Linux Step-by-step & TyGeMo: 		    http://netllama.ipfox.com

  18:55:01  up 155 days, 22:26,  1 user,  load average: 0.16, 0.04, 0.01



More information about the Linux-users mailing list