title: Warning: mkdir(): Permission denied in /opt/lampp/htdocs/
body: <p>I'm running on ubuntu 16.04 LTS and have installed Xampp</p>
  
  <p>My code is:</p>
  
  <pre><code>&lt;?php
   $dir = 'upload';
   if ( !file_exists($dir) ) {
       $oldmask = umask(0);
       mkdir ($dir, 0744);
   }
  </code></pre>
  
  <p>and I'm facing an error </p>
  
  <blockquote>
    <p>Warning: mkdir(): Permission denied in /opt/lampp/htdocs/imageupload/index1.php on line 5</p>
  </blockquote>
  
  <p>What can I do?</p>