title: Where does Linux keep 'ruid' and 'euid'?
body: <p>I wonder where Linux kernel keeps 'ruid' and 'euid'.</p>
  
  <p>Below is what I know about them.</p>
  
  <p>When an user runs a file and the file turns to a process, the process gets to have ruid and euid.</p>
  
  <p>If the file had been set to use setuid, euid of the process would change to user id of the owner of that file, and if not, euid would not change and be the same as ruid.</p>
  
  <p>Then, Linux kernel allows the process to run another process or use other resources in the system according to ruid and euid.</p>
  
  <p>So, I think that means kernel has to keep ruid and euid of each process somewhere in RAM.</p>
  
  <p>I thought the 'somewhere' is in PCB, but PCB block does not have fields for ruid and euid.</p>
  
  <p>I tried to find them in the process file of '/proc' directory, but failed.</p>
  
  <p>Where does Linux keep ruid and euid of running processes?</p>