title: Android internal storage reading file
body: <p>I have a problem with Android internal storage. I have created folder in package root folder calling <code>getDir()</code> and with <code>MODE_WORLD_WRITEABLE</code> because I want camera app to write captured image in this folder. Anyway, I can see that captured image is inside that folder with <code>DDMS</code>. 
  Problem is that I cannot read that file.</p>
  
  <p>I tried to read file with this code:</p>
  
  <pre><code>File file = context.getDir("images", Context.MODE_WORLD_READABLE);
  File image = new File(file, "image.jpeg");
  if (image.canRead()) 
      Log.w("read", "can read");
  else
      Log.w("read", "can't read");
  </code></pre>
  
  <p>And in LogCat there is only second message (can't read).</p>
  
  <p>I have also tried to create <code>FileInputStream</code> with file name but I receive <code>FileNotFoundException</code>.</p>
  
  <p>Can somebody tell me what I'm doing wrong here?</p>
  
  <p>Thanks in advance</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>Reading file is correct but only problem is that when cam app is saving image to specified location, permission set by cam app to image file are <code>-rwxrwx---.</code> After changing permissions with </p>
  
  <pre><code>adb (chmod 777 image.jpeg) 
  </code></pre>
  
  <p>I was able to read image. Interesting thing is that cam app is writing images files to <code>sdcard</code> with <code>----rwxr-x</code>.</p>
  
  <p>Is there any way to change file permission in runtime?</p>