Description of Problem: chowning an suid file does not strip the suid bit. IMHO this is an important safety feature. I'm not sure at which version the 2.4 kernel series began doing this, but in 2.2 it was added into 2.2.13: http://www.linux.org.uk/VERSION/relnotes.2213.html (search for string "chown"). Steps to Reproduce: 1. chown nobody /bin/su 2. ls -l /bin/su Actual Results: -rws--x--- 1 nobody wheel 18452 Jul 23 2001 /bin/su Expected Results: -rwx--x--- 1 nobody wheel 18452 Jul 23 2001 /bin/su Additional Information: Reproducible at least on kernel-2.4.9-21
POSIX does not require this, furthermore there are other reasons it is a bad idea such as mandatory locking flags. See the man page for a detailed discussion on this.