I'm currently studying for the LPIC-1 Linux Certification. For this, I'm using the 'All-in-One' Exam Guide, released by McGraw Hil & edited by Robb Tracy. (First edition, with no errata available on the McGraw Hill website).
When I research SUID special permissions on the Internet, most of the information is akin to:
A program is executed with the file owner's permissions (rather than with the permissions of the user who executes it).
and
When SUID permission is set on an executable file, a process that runs this file is granted access based on the owner of the file (usually root), rather than the user who is running the executable file.
...Now, in my textbook, the information is stated a little differently. Behold:
FIGURE 1: Chapter content
FIGURE 2: Quiz question
FIGURE 3: Quiz answer
I thought, based on the things I've read online, that the correct answer would be 'A': the user who created the file remains the owner. Ownership and permission are two different things, right? So, while SUID would grant temporary permissions to the user who executes the binary, it shouldn't change the binary's owner.
So... either I'm confused, or this is a first-edition screw up.
Brothers & sisters? Help!!
The file does not change its owner. But the process, started by user from file with SUID, has file owners permissions.
This feature is mostly used to run as root programs from non-root user. You can find examples in /bin
and /usr/bin
directories.