O'Reilly logo

Linux and Unix Shell Programming by David Tansley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required