[CentOS] strange chgrp behavior
ruprich at uikt.mendelu.cz
Tue Sep 4 11:16:48 UTC 2007
Thanks for your reply and your time,
i've reported it to centos bug tracking system. I will try it also on
RHEL and if it occurs, i'll sent it also to the RH.
> ISTM it's a bug and should be reported on both CentOS and RH tracking
> systems. Two errors are apparent. One may be difficult to correct.
> As you originally discovered, the user ID is being change during
> execution of the command to change a group. And it is using the ID from
> the symbolic link owner, as you later noticed.
> The 2nd bug is a recursion into the original directory via the symbolic
> link when dereference is not suppressed. IMO, recursion should not
> occur, but I know from a programming background that it takes a little
> foresight, thought and intense effort to avoid this sort of trap.
I think, that dereferrence should occure (at least for my coreutils
version); man chgrp:
affect the referent of each symbolic link, rather than the symbolic
link itself (this is the default)
> As an afterthought, how valid is it to have user control files that are
> supposed to be contained in an "invisible" directory in the user's
> $HOME? This presents a "non-standard" structure that offers increased
> opportunities for mishaps of various types.
Well, that's another point, but that's not my job here :( I realized
this behavior on shared home directories server. These homes are
used by Win domain in classrooms, on terminal services, etc. It's not my
business to control, if some users (or local administrators) create symlink
to their home directory... But maybe i should write some little audit
scrip, which would search for these...
More information about the CentOS