December 2018
Beginner
320 pages
8h 57m
English
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 ran the program.
The passwd command has setuid applied by default in Linux systems, as shown in the following screenshot:

The chmod command can be used to add setuid to a script file named myscript,as shown in the following command line: ...
Read now
Unlock full access