BUG: interesting Solaris 2.5 bug in cp; deletes source file

BUG: interesting Solaris 2.5 bug in cp; deletes source file

Post by Richard P. Baint » Wed, 13 Mar 1996 04:00:00





>On a Solaris 2.5 (SPARC) system:
>[seurat 339] cp -p foo foo~
>cp: cannot clear S_ISUID and S_ISGID bits in foo~: Not owner

There is a patch for this. Unfortunately it's not security or
recommended so you have to have support. The patch number is 103162-01.

Ciao,

--
Richard Bainter          Mundanely     |    OS Specialist         - OMG/CSD
Pug                      Generally     |    Applied Research Labs - U.Texas

Note: The views may not reflect my employers, or even my own for that matter.

 
 
 

BUG: interesting Solaris 2.5 bug in cp; deletes source file

Post by Ken Y » Wed, 13 Mar 1996 04:00:00


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.

 
 
 

BUG: interesting Solaris 2.5 bug in cp; deletes source file

Post by David L Bro » Thu, 14 Mar 1996 04:00:00


   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.

Patch 103162-01 fixed the problem for me.

Problem Description:

1231531 cp -ip deletes source files when file ownership is different


National Radio Astronomy Observatory

 
 
 

BUG: interesting Solaris 2.5 bug in cp; deletes source file

Post by Toomas Soo » Fri, 15 Mar 1996 04:00:00





: >On a Solaris 2.5 (SPARC) system:
: >[seurat 339] cp -p foo foo~
: >cp: cannot clear S_ISUID and S_ISGID bits in foo~: Not owner

: There is a patch for this. Unfortunately it's not security or
: recommended so you have to have support. The patch number is 103162-01.

ftp://ftp.ut.ee/pub/unix/sun-fixes/patches/2.5/

toomas soome
--
 Redistribution by Microsoft Network is prohibited.

 
 
 

BUG: interesting Solaris 2.5 bug in cp; deletes source file

Post by Eric McWhort » Sat, 30 Mar 1996 04:00:00


I noticed sar no longer works with Solaris 2.5.  It used to
work with Solaris 2.4.

gauss> sar -u
sar: can't open /var/adm/sa/sa28
No such file or directory
gauss>
--
Eric McWhorter                     2-207 Wilson Hall, MSU, Bozeman, MT 59717
Math Sciences                      (406)994-1788

 
 
 

BUG: interesting Solaris 2.5 bug in cp; deletes source file

Post by Ray W. Hiltbran » Sat, 30 Mar 1996 04:00:00


Did you uncomment the sar entries in the sys crontab?


> I noticed sar no longer works with Solaris 2.5.  It used to
> work with Solaris 2.4.

> gauss> sar -u
> sar: can't open /var/adm/sa/sa28
> No such file or directory
> gauss>
> --
> Eric McWhorter                     2-207 Wilson Hall, MSU, Bozeman, MT 59717
> Math Sciences                      (406)994-1788


--

Engineering Network Services
Auburn University
http://www.eng.auburn.edu/~rayh/rayh.html

   If you are not in the lead your view never changes.