|
I think that the question involves inode permissions rather than checking for which user is running the program.
And I think the OP got the sticky bit, suid bit and sgid bit confused since he set the sgid bit and then posted a question calling it the sticky bit while describing the behavior of the suid bit.
chmod 4775 file # set the suid bit
chmod 2775 file # set the sgid bit
chmod 1775 file # set the sticky bit
The suid bit causes an executable to assume the effective uid of its owner whenever it runs. But it only works with executables, not shell scripts. For awhile some kernels allowed it to work with shell scripts too, but this a major security hole.
To run shell scripts in an suid envirorment look at the freeware program called "sudo". It can do this securely.
|