Stock Android chown in /system/bin/chown doesn’t support the recursive switch which I discovered when I was trying to manually change owners and groups on an app folder.
chown -R u0_a160:u0_a160 databases/
resulted in the error message
No such user '-R'.
So you need to use Android Busybox chown:
busybox chown -R 10160:10160 databases/
Install Busybox first if you don’t have it, obviously. Note you need to use numeric UID/GIDs with busybox chown or you’ll get an unknown user error message. Find numeric owners and groups with the -n switch:
busybox ls -l -n /data/data