[BLUG] scp -p preserving ownership through root user

Mark Krenz mark at slugbug.org
Wed Jul 2 11:37:24 EDT 2008


I have some files that are owned on machine A by user X.   As the root
user on machine A, I run

  scp -p files root at machineB

  The mode and modification times are preserved, but the ownership is
not. I know that with rsync -a the ownership is preserved, but
according ot the scp man page, ownership isn't preserved with -p.  I
just got burned by this.  Tell me if I'm insane or not but I could swear
that this worked before.  It might have had this in a much older version
of scp, like the old non-openssh version of ssh.

Know your options.

-- 
Mark Krenz
Bloomington Linux Users Group
http://www.bloomingtonlinux.org/


More information about the BLUG mailing list