z/OS UNIX System Services Planning
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Creating a set-user-ID or set-group-ID executable file

z/OS UNIX System Services Planning
GA32-0884-00

A superuser or the file owner can use a chmod command or chmod() callable service to change two options for an executable file. The options are set in two file mode bits:
  • Set-user-ID (S_ISUID) with the setuid option
  • Set-group-ID (S_ISGID) with the setgid option

If one or both of these bits are on, the effective UID, effective GID, or both, plus the saved UID, saved GID, or both, for the process running the program are changed to the owning UID, GID, or both, for the file. This change temporarily gives the process running the program access to data the file owner or group can access.

In a new file, both bits are set off. Also, if the owning UID or GID of a file is changed or if the file is written in, the bits are turned off.

In shell scripts, these bits are ignored.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014