title: When running ASPNET Core application in Ubuntu 16.04 how can I access a file in another folder?
body: <p>I am trying to run an ASP5/MVC6 ASPNET core application in Ubuntu 16.04 using dotnet core 1.1.  My application resides in one directory off of the users home directory, and another directory off the home directory holds a folder structure with image (.jpg) files.</p>
  
  <p>I am receiving the following error...</p>
  
  <pre><code>fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[0]
  An unhandled exception has occurred: Access to the path '/home/myuser/myimages/somefolder' is denied.
  System.UnauthorizedAccessException: Access to the path '/home/myuser/myimages/somefolder' is denied. ---&gt; System.IO.IOException: Permission denied
  </code></pre>
  
  <p>Here is an example of the folder structure...</p>
  
  <pre><code>/home/myuser/mywebapp/mywebapp.dll
  
  /home/myuser/myimages/somefolder/someimage.jpg
  </code></pre>
  
  <p>I Have chmodded the following directories to 777..</p>
  
  <ul>
  <li>/home</li>
  <li>/home/myuser</li>
  <li>/home/myuser/myimages</li>
  <li>/home/myuser/myimages/somefolder</li>
  </ul>
  
  <p>... and I have chmodded file someimage.jpg to 777 as well.</p>
  
  <p>I am running the aspnet core application from /home/myuser/mywebapp.  I have tried sudo and no good.</p>
  
  <p>Can I reference files in ASPNET Core web app that are in a directory outside of the working directory?</p>