On Sat, Jun 03, 2006 at 10:03:27AM -0400, Michael Stone wrote:
> >$ /bin/chmod u=rwxs,go=rx /usr/bin/netselect
> >$ ls -la /usr/bin/netselect
> >-rwsr-xr-x 1 root root 11984 2006-05-13 01:14 /usr/bin/netselect
> >$ /bin/chown root:root /usr/bin/netselect
> >-rwxr-xr-x 1 root root 11984 2006-05-13 01:14 /usr/bin/netselect
> 
> The chown should always be first, or you could be setting the binary 
> suid to the wrong user. At any rate, changing the owner of a setuid file 
> causes the kernel to clear the suid bit as a security measure.

thanks for the quick explanation! Indeed it makes sense but I never noticed the
behaviour before (i.e. it was working as I expected)

filippo
--
Filippo Giunchedi - http://esaurito.net
PGP key: 0x6B79D401
random quote follows:

To be learned in an art&C, the Theory is sufficient; to be a master of
it, both the Theory and practice are requisite.
-- Charles Hutton

Attachment: signature.asc
Description: Digital signature

Reply via email to