java.io.FileNotFoundException: /storage/MicroSD/WhatsAppold/a.apk: open failed: EACCES (Permission denied)

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
Expert tip

Check if android.permission.WRITE_EXTERNAL_STORAGE is in AndroidManifest.xml. Also, add checks in your code to see if the storage is available to write before trying to write. And last: create a folder to put your files inside.

Solutions on the web

via Stack Overflow by Panache
, 9 months ago
/storage/MicroSD/WhatsAppold/a.apk: open failed: EACCES (Permission denied)
via Stack Overflow by reevesnick
, 2 years ago
/storage/emulated/0/AggiesLand/878582989: open failed: ENOENT (No such file or directory)
via google.com by Unknown author, 1 year ago
via Stack Overflow by Bhiefer
, 1 year ago
/storage/sdcard1/Android/data/<applicationpackage>/files/somefolder/somefile.xml: open failed: ENOENT (No such file or directory)
via Stack Overflow by Aviel Gross
, 1 year ago
/mnt/sdcard/myTomatoes/covers/378194.PNG: open failed: ENOENT (No such file or directory)
via Stack Overflow by Arefin
, 2 years ago
/data/data/[packagename ommitted]/databases/mydb.db: open failed: ENOENT (No such file or directory)
java.io.FileNotFoundException: /storage/MicroSD/WhatsAppold/a.apk: open failed: EACCES (Permission denied)
at libcore.io.Posix.open(Native Method)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:110)
at libcore.io.IoBridge.open(IoBridge.java:393)
at java.io.FileOutputStream.(FileOutputStream.java:88)
at java.io.FileOutputStream.(FileOutputStream.java:73)
at net.rdrei.android.dirchooser.sample.DirChooserSample.moveFile(DirChooserSample.java:109)
at net.rdrei.android.dirchooser.sample.DirChooserSample$3.onClick(DirChooserSample.java:76)
at android.view.View.performClick(View.java:4478)
at android.view.View$PerformClick.run(View.java:18698)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:149)
at android.app.ActivityThread.main(ActivityThread.java:5257)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)

Users with the same issue

Once, 1 year ago
2 times, 1 year ago
Once, 1 year ago
4 times, 7 months ago
8 times, 4 months ago
45 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.