How Android file access works in SFOSX 4.0?

I have a XA2 Plus (H3413) with licensed SFOS Koli.
Among installed Android apps, I have the OI File Manager, and a book reader called EBookDroid.

  1. When I try to open a book residing in the native home folder through EBookDroid’s built-in file browser (i.e. through /storage/sailfishos_storage/Documents/books), all files have zero size, which suggests denied access:


    (None of the books can be opened, of course).
    All files have been chmodded to 666, the containing dir has been chmodded to 777:

  2. When I try to open the exact same path through OI File Manager, everything works fine:

  3. When I copy one of the files to ~/android_storage and try to open it there with EBookDroid, it works perfectly fine.

  4. Now comes the best part. If I tap on one of the files in the native home folder using OI File Manager and select “open with EBookDroid”, this file is opened in EBookDroid perfectly fine.
    It almost looks like a transfer of UID’s access rights from parent to child during a fork.

I’m confus.

1 Like

[UPD]

  1. I tried to chown files in native home from defaultuser to media_rw. Nothing changed.
  2. I tried to mv the whole books folder to ~/android_storage. Now EBD works perfectly, despite everything still being owned by defaultuser:

    This suggests that filesystem access is somehow determined on path basis and not on owner basis.
1 Like