After my NANDroid restore didn't work as expected, flashed a clean ROM + Magisk.
When booted to system, internal storage is not accessible (regular File Manager, MTP, adb shell, MiXplorer's Internal Storage).
But it is accessible via elevated rights (TWRP File Manager, MTP when in recovery mode, su in adb shell, Root option in MiXplorer).
Permission while in recovery and booted to system are respectively:
drwxrwxrwx 2 system system 4096 1970-01-01 18:21 sdcard
lrw-r--r-- 1 root root 21 2009-01-01 05:30 sdcard -> /storage/self/primary
chmod -R 777 sdcard with no luck. As it is a symlink, did chmod directly to
/storage/emulated/0 but it doesn't have an effect.
--> Tried from scratch, wiping and formatting every partition and entire Internal Storage, tried older known working ROMs. Still the same.
Surely, it's a permissions issue. What am I missing?