title: Symfony3 File upload path not working in production
body: <p>I am making a small portfolio website with symfony. Everything works on my local machine, I can upload portfolio items, etc etc.</p>
  
  <p>On my droplet however (Ubuntu 16.04.1 x64, running Nginx)</p>
  
  <p>So I follow the guide for uploading files at <a href="http://symfony.com/doc/current/controller/upload_file.html" rel="nofollow">http://symfony.com/doc/current/controller/upload_file.html</a></p>
  
  <p>Everything works locally, but I get a 500 error on my production droplet.
  I checked my logs for the error, and it seems that, the path I set up in my parameters :</p>
  
  <p>(<code>portfolio_directory: '%kernel.root_dir%/../web/images/portfolio'</code>)</p>
  
  <p>gives the following error</p>
  
  <p><code>
  [2016-09-20 12:36:33] request.CRITICAL: Uncaught PHP Exception Symfony\Component\HttpFoundation\File\Exception\FileException: "Unable to write in the "/var/www/wsly/www/app/../web/images/portfolio" directory" at /var/www/wsly/www/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/File.php line 113 {"exception":"[object] (Symfony\\Component\\HttpFoundation\\File\\Exception\\FileException(code: 0): Unable to write in the \"/var/www/wsly/www/app/../web/images/portfolio\" directory at /var/www/wsly/www/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/File.php:113)"}
  </code></p>
  
  <p>Now the permissions for the entire images folder is set to 777 (I used chmod -R 777 for this) so I don't think the issue is actually that the permission, but rather that the path is incorrect? Not sure but app/../web is not a valid path, it seems to literally copy the path as the root directory is the app directory? instead of up one level with the /../</p>
  
  <p>Can't seem to figure this out.</p>