Android 6 (cyanogenmod 13) external sd card write access I always used "Samba server" application on all my android devices for uploading files, it worked great with CM12, but in CM13 even with root access Samba server can't write to external SD card, neither can "SSH server" application. As i there was some changes in android 6, but is there any way to grant write access to external SD card for some applications? I tried different samba servers, they all see external SD card and can read from there, but they just can't write. 

I have the same problem with Cyanogenmod 13 on two different devices, i tried to format external SD card in ext3, ext4, fat32, exfat - no difference at all. There are a lot of "SD card fix" applications in play store, but they all, as I can see for android 5, and just doesn't work for android 6.

So, is it a SELinux issue? Should I add somehow user an app runs from into media_rw group? How can I do this? There is id output after ssh connection:

uid=10138(u0_a138) gid=10138(u0_a138) groups=10138(u0_a138),3002(net_bt),3003(inet),9997(everybody),50138(all_a138) context=u:r:untrusted_app:s0:c512,c768

It can read but can't write on external sd card, any ideas? Thanks.
As I found out for now, there is no way to give such permission, except running whole application as root, and that ins't easy (or even possible?) without modifying application code, anyway, running apps with uid=0 is a bad idea anyway. The problem is, that in android 6 WRITE_EXTERNAL_STORAGE permission should be asked on runtime by an application, and if the application isn't Android 6-aware, there is basically nothing we can do. I hope that developers will adapt their application for new Android 6 reality soon.