Re: can non-owner change file group setup?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



mcclnx mcc wrote:
> I don't think that is true:  (my login ID are member of DBA and OINSTALL group)
> 
> $ ls -al
> total 13936
> drwxrwxrwt   8 root   root        4096 May 13 04:02 .
> drwxr-xr-x  32 root   root        4096 Feb 11 15:36 ..
> -rwxrwxr--   1 oracle dba            9 May 11 20:50 aabb
> 
> $ chgrp oinstall aabb
> chgrp: changing group of `aabb': Operation not permitted

Correct - you can't change the existing file.  However, you can replace 
it if you have write access in the containing directory:
cp aabb aabb.tmp
chgrp oinstall aabb.tmp
mv aabb.tmp aabb

You'll change the owner and break any other hard links as a side effect too.

-- 
   Les Mikesell
    lesmikesell@xxxxxxxxx
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux