scp

Bob Proulx bob at proulx.com
Sun Oct 20 03:59:25 EST 2002


Jim Knoble <jmknoble at pobox.com> [2002-10-17 17:34:48 -0700]:
> Circa 2002-10-16 13:20:32 -0500 dixit Ladner, Eric (Eric.Ladner):
> : Actually, my current workaround is like this to copy a tree:
> : cd /some/tree; tar -cf - . | ssh remote_host "cd /some/other/tree; tar -xvf -"
> 
> By the way, what you probably want on the extracting end is:
> 
>   tar -xvpf -
> 
> in order to to preserve permissions.  If using GNU tar, you may also
> also want '--same-owner' and '--sparse'.

Actually I think the options specified were fine.  IIRC if you are
root then the permission restoration is the default for tar.  If you
are not root then modern OS configuration won't allow a non-root user
to chown a file to another user and this would fail anyway.  Therefore
the default behavior without the 'p' option is the usual desired
behavior.

On older operating systems especially those based upon SysV you could
chown files to other users.  But that is a less desirable
configuration IMNHO.  (Even though some still preserve that capability
for their legacy.  But I always turn that off on hpux and get a modern
behavior.)

Bob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20021019/8fb271c3/attachment.bin 


More information about the openssh-unix-dev mailing list