[CentOS] can non-owner change file group setup?
Les Mikesell
lesmikesell at gmail.com
Wed May 13 15:08:43 UTC 2009
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 at gmail.com
More information about the CentOS
mailing list