title: How to fix Error: mkdir(): Permission denied when running composer
body: <p>I have a ec2 image and get the following error when trying to create a new laravel project.</p>
  
  <blockquote>
    <p>[ErrorException] mkdir(): Permission denied</p>
  </blockquote>
  
  <p>Here is the command:</p>
  
  <pre><code>composer create-project laravel/laravel mydir
  </code></pre>
  
  <p>I can write to the folder with my ec2-user username but do I need to add permission for composer to write?</p>