Why can't WhatsApp write to bind mounts?
Why can't WhatsApp write to bind mounts?

# mount -o bind /mnt/runtime/write/6333-6461/WhatsApp /mnt/runtime/write/emulated/0/WhatsApp



Apps cannot directly access /mnt/runtime/write/6333-6461 or /mnt/runtime/write/emulated/0/ because /mnt/runtime is only traverse-able by root. Apps access /storage/emulated/0 or /sdcard (symlink to the former) which is bind-mounted to /mnt/runtime/write/emulated/0/ for apps with WRITE_EXTERNAL_STORAGE permission. External SD card is accessible at /storage/6333-6461 in the same way.

When /mnt/runtime/write/6333-6461/WhatsApp is bind-mounted at /mnt/runtime/write/emulated/0/WhatsApp, WhatsApp will actually try to write to external SD card which is not allowed at least since Android 4.4. This is controlled by using permissions READ|WRITE_EXTERNAL_STORAGE / READ|WRITE_MEDIA_STORAGE, GID everybody (9997) / media_rw (1023) and mount namespaces. See details in How to move files to external SD card?.


  Any solution to the problem?


There are some workarounds to set required permissions using FUSE or sdcardfs when bind mounting external directories. For details see How to bind mount a folder inside /sdcard with correct permissions?