Originally posted by: SystemAdmin
no. not necessarily always root permission. Rather, the program runs with the permission of the owner of the program and not the one who runs the program.
Given a user "john". And "ls -l program" says the program's owner is "mary" and the program is suid. When john executes the program, the program will run and will have permission to that of mary and not john.
In normal situation wherein an executable program is not suid. When a user "A" runs that program, the program will run having the user A's permission. Therefore, suid programs is a little tricky technique of making the program assume permission of someone else rather than the one who runs the program.
So you see, it is not necessarily root permission but instead, the program owner's permission. If the programs is owned by root, then it will be with root permission, like the case of /bin/passwd.
This is one area where i've known lots of guys think they understand it but upon deeper inspection they don't.
gid follows the same logic.
#AIX-Forum