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
--- 09/5/12 (二),Les Mikesell lesmikesell@gmail.com 寫道:
寄件者: Les Mikesell lesmikesell@gmail.com 主旨: Re: [CentOS] can non-owner change file group setup? 收件者: "CentOS mailing list" centos@centos.org 日期: 2009年5月12日,二,下午3:38 nate wrote:
mcclnx mcc wrote:
We are tried to count how many files belong to
certain group. Our system
administrator told us "non-owner" can easy change
file group name to
another. I have been tried several
combination and never successful (only
ROOT can change file group to other name).
Does anyone know how "no-owner" can change file
group name?
If the "no-owner" user has write access to the file
they could
copy the file to a new file name(thus getting
ownership of the
file), and overwriting the original file with the new
file.
You need write access in the directory, but only read access to the original file to do this.
-- Les Mikesell lesmikesell@gmail.com _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
______________________________________________________________________________________________________ 付費才容量無上限?Yahoo!奇摩電子信箱2.0免費給你,信件永遠不必刪! http://tw.mg0.mail.yahoo.com/dc/landing
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.