definitions of uid and euid

Peng Yu
Tue Feb 2 17:04:38 GMT 2021


`man getuid` says the following without explaining what real user ID
and effective user ID are.

- getuid() returns the real user ID of the calling process.
- geteuid() returns the effective user ID of the calling process.

Could anybody explain the definitions of uid and euid, and provide a
minimum working example demonstrating when they are different? Thanks.


More information about the Libc-help mailing list