title: Composer global require Laravel/Installer not working on Ubuntu
body: <p>I'm trying to run <code>composer global require "laravel/installer"</code> on my Ubuntu machine (Trenta OS Distro) and for some reason I can't get it to install.</p>
  
  <blockquote>
    <p>file_put_contents(./composer.json): failed to open stream: Permission denied</p>
  </blockquote>
  
  <p>I get the error above on every attempt. I've been unable to find any help on google so I'm guessing this isn't a very common problem. I tried  <code>whereis</code> command on that file and it gives me a location</p>
  
  <pre><code>/usr/local/bin/composer
  </code></pre>
  
  <p>I tried running <code>chmod -R 777</code> on that file but it did nothing. I don't know what else to do.</p>
  
  <p>Composer was installed on my machine with the following command</p>
  
  <pre><code>curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
  </code></pre>
  
  <p>I thought <code>composer.json</code> only comes with projects, but I shouldn't need an existing project in order to simply set up the Laravel Installer right?</p>