Real, Effective, and Saved User ID

The preceding functions dealt with real and effective user IDs and group IDs. There is a third level of identification known as the saved user ID and group ID. Three levels of user ID and group ID can be very confusing. The explanations provided for user ID in the following sections apply equally to group ID.

The Effective User ID

Although the setuid(2) call has not been covered yet, recall that it can change the effective user ID for a process. The effective user ID determines what level of access the current process has. When the effective user ID is zero (root), then the process has unrestricted access, for example.

The Real User ID

The real user ID is what it sounds like. It identifies who you really are. ...

Get Advanced UNIX 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.