title: permission denied upon mkdir
body: <p>I use <code>mkdir()</code> to create a directory on my server:</p>
  
  <pre><code>// $var_name is equal to an md5() hash
  $path = "/var/www/publish/" . $var_name;
  if(mkdir($path)) {
    echo "success";
  } else {
    echo "error";
  }
  </code></pre>
  
  <p>This will yield an error due to a permission denied. Looking up on my server, by doing <code>ls -lh</code></p>
  
  <pre><code>drwxr-xr-x  2 root     root   4.0K Aug 17 09:05   publish
  </code></pre>
  
  <p>But if my <code>$path</code> is equal to <code>$path = "/var/www/" . $var_name;</code> it will create the folder I expected. What seems to be the issue in here.</p>