The second account seems to have no rights to write to /data/data...
Correct.
So, what can be done about it?
I am guessing that you hard-coded a path. If so, do not do this. Use getDatabasePath()
to find the proper path to the database for the current user.
Is there a folder which can be used to share data between users?!
Not that I am aware of. Even external storage is separate between users. In effect, separate user accounts on a device are as if those users are on completely separate devices.