I would like to understand something about Android’s roles and, specifically, why if I execute this function of the class Context
openOutputFile(filename, MODE_WORLD_WRITEABLE)
the created file has write permissions for each role (User, Group, Others), whilst has read permissions just for User and Group.
I think it is not an o.s. lock, because if I try to change permissions executing this code
Runtime.getRuntime().exec("chmod 666 FILE_PATH")
it sets read and write permissions for each role.
Is it normal? “Who are” people in Others’ role?
Why the first instruction does not set read permission for “Others”?
Thanks.
Yes.
All apps on the device, other than yours.
Because you did not ask it to. Use
MODE_WORLD_READABLEto set read access bits.