What is SGID and how to set SGID in Linux?

24809

This is next to SUID in our ongoing Linux file and folder permissions series. We already discussed about CHMODUMASKCHOWNCHGRPSUIDStickyBit and SUDO  concepts in our previous posts. In this post we will see

What is SGID?

Why we require SGID?

Where we are going to implement SGID?

How to implement SGID in Linux?

What is SGID?

SGID (Set Group ID up on execution) is a special type of file permissions given to a file/folder. Normally in Linux/Unix when a program runs, it inherits access permissions from the logged in user. SGID is defined as giving temporary permissions to a user to run a program/file with the permissions of the file group permissions to become member of that group to execute the file. In simple words users will get file Group’s permissions when executing a Folder/file/program/command.

SGID is similar to SUID. The difference between both is that SUID assumes owner of the file permissions and SGID assumes group’s permissions when executing a file instead of logged in user inherit permissions.

Read Full Post: http://www.linuxnix.com/sgid-set-sgid-linuxunix/