1.6. Set-uid

In Table 1.1 (see p. 6) there was an entry for user or group set-ID (suid and guid). This permission bit has been a hot potato for the last few years. Some vendors do not allow the implementation of this bit or completely ignore it even if it has been set, because of the security risk it allows. So what’s all the fuss about?

The idea behind suid is that the person who is running a script where the owner has set the suid inherits the permissions of the owner of the script. So if root has a script that has a suid bit set and an ordinary user runs this script, he assumes root privileges for the script’s run time. The same principle applies to guid, which assumes the privileges of the group that owns the script.

1.6.1. Why use set-uid ...

Get Linux and Unix Shell Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.