title: Permissions with mkdir won't work
body: <p>I can't understand why I have to use <code>chmod</code> to get the correct permissions..
  The file is created succesfully but with 0755 and not 0775 that I specify in <code>mkdir</code> .</p>
  
  <p>( <a href="http://php.net/manual/en/function.mkdir.php" rel="noreferrer">http://php.net/manual/en/function.mkdir.php</a> )</p>
  
  <p>I have to do <code>chmod</code> after <code>mkdir</code> to set the correct permissions.</p>
  
  <p>Safe mode is off in php.ini and the folder belongs to php's group and owner (www-data)</p>
  
  <p>This doesn't work:</p>
  
  <pre><code>  if(!is_dir("/var/www/customers/$username/$project_name")) 
    {
      mkdir("/var/www/customers/$username/$project_name",0775);
  
    }
  </code></pre>
  
  <p>But this does:</p>
  
  <pre><code>  if(!is_dir("/var/www/customers/$username/$project_name")) 
    {
      mkdir("/var/www/customers/$username/$project_name");
      chmod("/var/www/customers/$username/$project_name",0775);
  
    }
  </code></pre>