On a Solaris 2.5 (SPARC) system:
[seurat 337] whoami
ken
[seurat 338] ls -l f*
-rw-rw-r-- 1 ken dimmis 2 Mar 12 14:08 foo
-rw-rw-r-- 1 bill dimmis 2 Mar 12 14:09 foo~
[seurat 339] cp -p foo foo~
cp: cannot clear S_ISUID and S_ISGID bits in foo~: Not owner
[seurat 340] ls -l f*
-rw-rw-r-- 1 bill dimmis 2 Mar 12 14:10 foo~
[seurat 341]
In case you didn't see what happened there, the cp *deleted* foo.
On a SunOS4.1.4 (SPARC) system:
[alba 832] whoami
ken
[alba 833] ls -l f*
-rw-rw-r-- 1 ken 2 Mar 12 14:20 foo
-rw-rw-r-- 1 bill 2 Mar 12 14:20 foo~
[alba 834] cp -p foo foo~
cp: foo~: Not owner
[alba 835] ls -l f*
-rw-rw-r-- 1 ken 2 Mar 12 14:20 foo
-rw-rw-r-- 1 bill 2 Mar 12 14:21 foo~
[alba 836]
Looks ok.
On a Linux system:
asturias:/tmp$ whoami
ken
asturias:/tmp$ ls -l fo*
-rw-rw-r-- 1 ken users 2 Mar 12 14:36 foo
-rw-rw-r-- 1 guest users 2 Mar 12 14:38 foo~
asturias:/tmp$ cp -p foo foo~
cp: foo~: Operation not permitted
asturias:/tmp$ ls -l fo*
-rw-rw-r-- 1 ken users 2 Mar 12 14:36 foo
-rw-rw-r-- 1 guest users 2 Mar 12 14:38 foo~
asturias:/tmp$
I assume the operation not permitted is changing the mode and/or time
of a file I don't own.
In all the cases above the contents of the file were copied correctly.