Besides the basic permissions set, which is applicable by default, Linux also has some special/advanced permission sets, which are used sometimes to enhance some functionalities. These permissions are applicable to files (mainly executable files) and directories. These are setuid, setgid, and sticky bit.
Setuid and setgid are two special permissions that are applied to executable files.
If setuid is applied to an executable file, it means that if that file is executed as a program, then it will run as the user of the file and not as the user who ran the program.
Similarly, when setgid is applied to the file, it runs as the group of the file and not as the group that...