title: How work with chmod() in assembly linux x86?
body: <p>How can i use chmod() to change file permissions in Assembly linux x86 ? 
  i want a sample code in assembly ,
  i see help guide but still it's very hard to understand</p>
  
  <p><a href="http://man7.org/linux/man-pages/man2/chmod.2.html" rel="nofollow">http://man7.org/linux/man-pages/man2/chmod.2.html</a></p>
  
  <pre><code>int chmod(const char *pathname, mode_t mode);
  </code></pre>
  
  <p>chmod() have 2 argv , first is pathfile name and second is mod !</p>
  
  <p>path /Users/paul/Desktop/file.txt
  and mode_t modes are :
  S_ISUID , S_ISGID , S_ISVTX , S_IRUSR ,S_IWUSR </p>
  
  <p>and more can see in url
  first question: i need set these values in the varible of ecx or i must use 
  values numbers ,which one i must use ?  S_IWGRP  or 00020    #write by group</p>
  
  <p>second question: Am i doing it truely ?  i put these in ecx and execute same this :</p>
  
  <pre><code>mov eax,15   
  mov ebx,mypathfile
  mov ecx,S_IWUSR
  int 0x80
  </code></pre>
  
  <p>someone can get me code example ?</p>
  
  <p>and the last question is , how can i set 777 permission to file (read write execute for all) ?</p>
  
  <p>Thanks.</p>