title: setuid vs seteuid function
body: <p>What is the difference between setuid and seteuid function. In man page both of the function have similar description.</p>
  
  <p>setuid:</p>
  
  <pre><code>DESCRIPTION
  
     setuid()  sets  the  effective user ID of the calling process.  If the effective UID of the caller is root, the real UID and saved
     set-user-ID are also set.
  </code></pre>
  
  <p>seteuid:</p>
  
  <pre><code>DESCRIPTION
  
     seteuid()  sets  the  effective user ID of the calling process.  Unprivileged user processes may only set the effective user ID to
     the real user ID, the effective user ID or the saved set-user-ID.
  </code></pre>
  
  <p>In both of the description contains <code>sets  the  effective user ID of the calling process</code>. So what is the difference between 
  these two and how the functionality differs between these functions.</p>
  
  <p>And One more doubt is, using chmod(chmod u+s ) only we 
  can set the set user id permission to the file. Then only during runtime of the program, the process have permission who is set to set
  user id. Apart from these how these functions set the effective userid to the process.  </p>