Permission on android Marshmallow?


Hi everyone,

I’m facing a problem with my app, and I need your help…

I’m using cordovaFileTransfer plugin and works fine, the problem is when I’m test it on android >6.0… give me the next error: > "Open failed: EACCES (Permission denied)" when I try download a file.
I read about it and seems like a new security permissions in the marshmallow…
I tried insert in the config.xml file the next:

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

But didn’t work, how I can enable the permissions?
Thank you alll


Please somebody help me with this, there is a lack of information in the web about ionic + Marshmallow permissions!


I did use this plugin in an Ionic app a couple times running in android Marshmallow.
And I didn’t have this problem. Are you sure that you have the latest version of the plugin? and make sure that you did accept the storage access permission in the app.


@haytam Yes I have the latest version, I installed by doing this cordova plugin add cordova-plugin-file-transfer
where I accept the storage permission? Because I tested with ionic run android and nothing show me, the same occurs when I install the apk in my phone.


Can anybody help me please?


Nobody? I really need help for this problem :frowning:


Have you tried to reinstall fresh plugin? may be that plugin have update for this issue?


Thanks for your reply @umardraz!

I have the last version cordova-plugin-file-transfer 1.5.1


@leugim_ohlavrac any news on this? I’m having exactly the same problem.


I tried yesterday with a smartphone 6.0 and works fine, the marshmallow pop-up permissions showed up!
I really don´t know why suddenly works fine!

Make sure you have the last version of the plugin, and try to add the code that I quoted in my first post.
Try to reinstall the app again, maybe it is the problem.


Where are you storing the file? For Android if I use cordova.file.externalRootDirectory it gives me the EACCESS error, but if I use cordova.file.externalDataDirectory apparently downloads the file but I can’t find it anywhere.


I’m using externalRootDirectory… For cordova.file.externalDataDirectory, try this path sdcard/Android/data/“app-id”/files`


facing same issue, checked with compatibility version of platform and plugin,but to no avail.