title: FileNotFoundException EACCES (Permission Denied)
body: <p>I'm getting an exception that file open permission is denied when I'm trying to open a FileInputStream.</p>
  
  <pre><code> File myFile = new File(Environment.getExternalStorageDirectory()
             .getAbsolutePath() + "/test/test.txt");
   try {
        FileInputStream inStream = new FileInputStream(myFile); // crash
  </code></pre>
  
  <p>Here's the stacktrace:</p>
  
  <pre><code> System.err﹕ java.io.FileNotFoundException: /storage/emulated/0/test/test.txt: open failed: EACCES (Permission denied)
   System.err﹕ at libcore.io.IoBridge.open(IoBridge.java:456)
   System.err﹕ at java.io.FileInputStream.&lt;init&gt;(FileInputStream.java:76)
  
   ...
  
   Caused by: android.system.ErrnoException: open failed: EACCES (Permission denied)
   at libcore.io.Posix.open(Native Method)
   at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186)
   at libcore.io.IoBridge.open(IoBridge.java:442)
  </code></pre>
  
  <p>And yes, I do have the permissions in my manifest:</p>
  
  <pre><code>&lt;uses-permission android:name="ANDROID.PERMISSION.READ_EXTERNAL_STORAGE" /&gt;
  &lt;uses-permission android:name="ANDROID.PERMISSION.WRITE_EXTERNAL_STORAGE" /&gt;
  </code></pre>