ここには他の多くの優れた答えがありますが、私がまだ混乱している場合は、別のアプローチがあります。  私はこのものの学生であり、マスターではないことに注意してください。したがって、この答えは進行中の作業であり、少なくともまだまだ堅実な答えとは見なされません。この回答v0.2を検討してください。
グループは同時にシンプルで複雑です。
以下で使用されるIDのキー:  
KEY  Full name --------  Description---------------------------------------------
 u   User                 uID = User  ID (a unique # associated with each user)
 g   Group                gID = Group ID (a unique # associated with each group)
                            While each /etc/passwd entry has one uID and one gID,
                            additional gIDs can be associated with a users via
                            /etc/group.
 L   Login          IDs - uID and gID produced from the Login process.  
                            ('L' is not exactly standard Linux terminology, but
                            useful for explanations below.)
 F   File           IDs - uID and gID retrieved from a file's ownership.
                            ('F' is not exactly standard Linux terminology, but
                            useful for explanations below.)
 R   Real           IDs - Who actually                      runs a process 
 E   Effective      IDs - Who spoofed via setuid or setgid, runs a process
 O   Original Eff.  IDs - Place to save the original Effective ID when changing 
                          it (e.g. temporarily downgrading it) so can later 
                          restore it.  Also called "Saved ID"; (but 'S' was not 
                          used for here to help avoid confusion with the 'S' in  
                          'SetUserID' & SetGroupID.)
 +   Supplimentary gIDs - Optional, additional groups (none or more) running 
                          this process which can be used to test for permissions.
ユーザーおよびグループID名:
Category          USER  GROUP  Notes  
----------------- ----  -----  -------------------------------------------  
 From login:      LuID  LgID   From /etc/passwd lookup
 From files:      FuID  FgID   Each file has these. Set by creator process.
 For each running process:
            Real  RuID  RgID   Actual   user starting the program
       Effective  EuID  EgID   Assigned user starting the program*
           Saved  OuID  OgID   Saves original effective ID.
   Supplementary        +gID1  (optional, additional groups)
                        +gID2     
                         ...  
プロセスがIDを取得する方法:
1)ログインはユーザー名を認証しLuID、LgIDからを返します/etc/passwd。
2)最初のプロセスは、effective = real = login、つまり
EuID=RuID=LuID 
EgID=RgID=LgID
3)フォーク状の子供たちが継承しRuID、EuID、RgID、とEgID、しかし、)、(&おそらく保存&サップ  
注:基礎となるファイルシステムのsuidおよびnosuidマウントオプションも適用されます。
4a)s u idが set に使用されたEuID場合、EuID一時的に変更(たとえばルートからダウングレード)できますが、最初に元の値が保存されるOuIDため、必要に応じて後で復元できます。
4b)s g idが set に使用されたEgID場合、EgID一時的に変更(たとえばルートからダウングレード)できますが、最初に元の値が保存されるOgIDため、必要に応じて後で復元できます。
ファイルを作成する場合:
File's new id's are set from effective id's: FuID=EuID and FgID=EgID
(Permissions are set from umask.)
読み取り用に開くには:
If FuID = EuID  and  user-read bit is set, or  
If FgID = EgID  and group-read bit is set, or  
If FgID = +gID1 and group-read bit is set, or  
If FgID = +gID2 and group-read bit is set, ...  
then allow reading.
書き込み用に開くには:
(Same as above but write bit set to allow writing.)
実行のために開くには:
(Same as above but execute bit set to allow execution.)
メッセージを送信する必要がある場合:
Use RuID and RgID.  (Not EuID or EgID). *(Not sure where I read this.)*
参照:男性の資格情報
Extra: / etc / groupファイルをきれいに印刷するユーティリティは次のとおりです。
cat /etc/group | sort -t: -k3n | awk  -F ':' \
  'BEGIN{printf "\n%-20s %-3s %-8s %s", \
           "Group name","pw", "Group ID ", "User list"}\
   BEGIN{printf "\n%-20s %-3s %-8s %s\n", \
           "----------","--", "---------", "---------"} \
        { printf "%-20s %-3s %8d %s\n", $1, $2, $3, $4 }'