title: EACCESS Permission denied in Android
body: <p>While writing file in External SD card I am getting an error EACCESS permission denied. I have set the permission 
  <code>&lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/&gt;</code>
  But the when I read the file I am successfully able to read it but not able to write the file. The code that I am using for writing the file in SD card is:</p>
  
  <pre><code>String path="mnt/extsd/Test";
  
                  try{
                      File myFile = new File(path, "Hello.txt");              //device.txt
                      myFile.createNewFile();
                      FileOutputStream fOut = new FileOutputStream(myFile);
  
                      OutputStreamWriter myOutWriter = new OutputStreamWriter(fOut);
                      myOutWriter.append(txtData.getText());
                      myOutWriter.close();
                      fOut.close();
                      Toast.makeText(getBaseContext(),"Done writing SD "+myFile.getPath(),Toast.LENGTH_SHORT).show();
                  } catch (Exception e) {
                      Toast.makeText(getBaseContext(), e.getMessage(),Toast.LENGTH_SHORT).show();
                      System.out.println("Hello"+e.getMessage());
                  }
              }
  </code></pre>
  
  <p>The path for the external storage card is <code>mnt/extsd/</code>. Thats why I am not able to use <code>Environment.getExternalStorageDirectory().getAbsolutePath()</code> which is giving me a path <code>mnt/sdcard</code> and this path is for internal storage path in my tablet. Please suggest why this is so n how can I resolve this</p>