UID, GID – real and effective – difference !

Reading the book by Uresh Vahalia, Unix Internals, I could understand exactly what is the concept behind real and effective UID and GID. I immediately thought of blogging it for reference.

The effective UID and effective GID affect file creation and access. During file creation, the kernel sets the owner attributes of the file to the effective UID and effective GID of the creating process. During file access, the kernel uses the effective UID and effective GID of the process to determine if it can access the file.

The real UID and real GID identify the real owner of the process and affect the permissions for sending signals. A process without superuser privilege can signal another process only if the sender’s real UID matches with the real UID of the receiver.

Child inherits the  credentials from the parent. since parent-child share the credentials, they can signal each other. CMIIW.

Advertisements

One thought on “UID, GID – real and effective – difference !

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s