Exception 'open failed: EACCES (Permission denied)' on Android

前端 未结 30 1600
[愿得一人]
[愿得一人] 2020-11-22 00:59

I am getting

open failed: EACCES (Permission denied)

on the line OutputStream myOutput = new FileOutputStream

30条回答
  •  灰色年华
    2020-11-22 01:45

    I am creating a folder under /data/ in my init.rc (mucking around with the aosp on Nexus 7) and had exactly this problem.

    It turned out that giving the folder rw (666) permission was not sufficient and it had to be rwx (777) then it all worked!

提交回复
热议问题