title: File does not created in android?
body: <p>When I was tried to create a New File, I got a error message.</p>
  
  <p>Code:</p>
  
  <pre><code>try 
  {
      File root = new File(Environment.getExternalStorageDirectory().getAbsolutePath());
      Runtime.getRuntime().exec("chmod 777 " + root.getAbsolutePath());
      File myFile = new File(root,"createNew.txt");
      myFile.createNewFile();
  }
  catch(Exception e)
  {
      Toast.makeText(getBaseContext(), e.getMessage(),Toast.LENGTH_SHORT).show();
  }
  </code></pre>
  
  <p>Error Message:</p>
  
  <pre><code>java.io.IOException: open failed: EACCES (Permission denied)
  </code></pre>
  
  <p><code>/mnt/sdcard</code> Permission as <code>d---------</code></p>
  
  <p>How do change Permission through programmatically?How do solve. Give me any idea.</p>
  
  <p>Thanks in advance.</p>
  
  <p>Note this point:</p>
  
  <p>When I was used this code in command prompt, file is created successfully, In that code is:</p>
  
  <pre><code>`chmod 777 /mnt/sdcard`
  </code></pre>