title: Android 6.0 open failed: EACCES (Permission denied)
body: <p>I have added <code>uses-permission</code> including <code>WRITE_EXTERNAL_STORAGE</code>，<code>MOUNT_UNMOUNT_FILESYSTEMS</code>，<code>READ_EXTERNAL_STORAGE</code> to <code>AndroidManifest.xml</code>.</p>
  
  <p>When I tried to run my application in Nexus5 (Android 6.0),it threw a exception as below:</p>
  
  <p><code>java.io.IOException: open failed: EACCES (Permission denied)</code></p>
  
  <p>And I tried another Android phone(Android 5.1),everything was OK.Here's the code:</p>
  
  <pre><code>private File createImageFile() throws IOException {
      String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date());
      String imageFileName = "JPEG_" + timeStamp + "_";
      File storageDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);
      File image = File.createTempFile(imageFileName, ".jpg", storageDir);
      currentPhotoPath = image.getAbsolutePath();
      return image;
  }
  </code></pre>
  
  <p>Does Android 6.0 have difference about permission? </p>