Thanks. That explains everything.
Originally Posted by john77eipe
It seems it works on both executables and non-executables. I believe if setuid bit is set, then the file he is executing or opening to write should give him full privileges as that of the process.
My bad! I didn't make any sense (above).
It is true that the Linux kernel ignores the setuid and setgid bits on shell scripts. These bits work only on binary (compiled) executables.
Ubuntu Forums Code of Conduct