Bug 619 - scp permissions
Summary: scp permissions
Status: CLOSED WONTFIX
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: scp (show other bugs)
Version: 3.6.1p2
Hardware: All Other
: P2 normal
Assignee: OpenSSH Bugzilla mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-16 17:13 AEST by johnf
Modified: 2004-04-14 12:24 AEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description johnf 2003-07-16 17:13:47 AEST
I hope this isn't FAQ but I can't find an answer for this: If a file
named /a/some_file is in Unix machine 'A' and it's owned by user
'someuser', if I run 'scp -p root@A:/a/some_file another_file', I
expected the permissions, timestamp, owner and group of the file to
be the same as the target_file. The timestamp and permissions are
correct but the owner becomes root instead of 'someuser'. I'm not sure
if this is a bug but I know some older versions of ssh keep the
owner and the group of the file.

Thanks!
Comment 1 Damien Miller 2004-02-10 13:37:27 AEDT
This behaviour is by-design: scp doesn't try to change the ownership of files
that it copies. 

Why? The simple answer is that rcp didn't and scp is rcp-over-ssh. A better
explanation would probably be that the owner user on the local host is not
guaranteed to exist on the remote host.

In any case, the behaviour won't be changing as it has too many consequences. If
you want to preserve ownership, use tar-over-ssh (its faster too).

(Sorry for the long delay in answering, but I just noticed this bug)
Comment 2 Damien Miller 2004-04-14 12:24:19 AEST
Mass change of RESOLVED bugs to CLOSED