I want a program can be run by a specific user (let's say tony) and the owner (root). I thought I could use setuid on the program:
chmod u+s program1.sh
But it returns out all other users can run program1.sh with owner's privilege. Instead of using setuid, change the group program1.sh so that the group contains tony could be good to allow only tony and the owner can run the program, but tony cannot run with owner's privilege.
So I don't know how to archive this requirement. Hope guys can give me some advice.