On Thu, 2007-08-30 at 19:39 +0200, Tomas Ruprich wrote:
> Thu, Aug 30, 2007 ve 06:05:49PM +0200, Tomas Ruprich napsal:
> > Greetings,
> > i had a following problem, which on one side i have already solved, but
> > on other side i don't thing it should behave this way and wish somebody to 
> > tell if it is feature or bug ;-)
> > 
> > [EMAIL PROTECTED] home]# chown user user/
> > [EMAIL PROTECTED] home]# ls -ld /home/user
> > drwxr-xr-x  66 user staff 4096 /home/user
> > [EMAIL PROTECTED] home]# chgrp -R staff user/
> > [EMAIL PROTECTED] home]# ls -ld user/
> > drwxr-xr-x  66 root staff 4096 user/
> >               ^^^^^^
> 
> just to be accurate, this doesn't happen when using --no-dereference and it 
> is not 
> changing permissions to root, but to user who is the owner of the link, so:
> 
> [EMAIL PROTECTED] home]# ls -la user/.openoffice/user/work
> lrwxrwxrwx  1 nobody root 13 Aug 28 14:35 user/.openoffice/user/work -> 
> /home/user
> [EMAIL PROTECTED] home]# ls -ld /home/user
> drwxr-xr-x  66 user staff 4096 /home/user
> [EMAIL PROTECTED] home]# chgrp -R staff user/
> [EMAIL PROTECTED] home]# ls -ld user/
> drwxr-xr-x  66 nobody staff 4096 user/
> <snip sig stuff>

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.

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.

--
Bill

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

Reply via email to