title: PHP mkdir() permissions
body: <p>I have a Linux server with appache as the web server. In my PHP script I am making directories with <code>0777</code> mode. the code is pretty simple as follows:</p>
  
  <pre><code>mkdir($path,0777)
  </code></pre>
  
  <p>when I run this script and go to my server file manager, the folder is there but the permission assigned to that folder is 0755. I can't figure out why this is happening!! when the folder is created the user column has apache in it but the permission is 0755.</p>