title: Laravel 5.2 uploading file Unable to write in directory
body: <p>I'm uploading files in my system and it works locally where am using windows and xampp but when hosting where am using an Linux my file is not being uploaded. I'm getting an error that it cannot be written in the 'system' directory which is within the public folder. This is my code:</p>
  
  <pre><code>$destinationPath = 'uploadFiles/'.$input['infolder']; // upload path
  $extension = Input::file('file')-&gt;getClientOriginalExtension(); // getting file extension
  $fileName = $input['type'] .'_'.sprintf("%06d",$input['id']) .'_'. date("Y-m-d_H-i-s") . '.' . $extension; // renameing image
  $upload_success =  Input::file('file')-&gt;move($destinationPath, $fileName); // uploading file to given path
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/WpC2F.png" alt="enter image description here"></p>