What exactly is your qn; it sounds like you've got the std Linux setup; u1 can only rw their dir (d1), u2 can only rw their dir (d2).
If they are in the same group, then you can make the dirs have the same group so that they can share files.. what do you want to see?
for privacy, you'd want
drwx------ u1 test d1
drwx------ u2 test d2
to share home dirs
drwxrwx--- u1 test d1
drwxrwx--- u2 test d2
or a shared dir
drwxrwx--- test test shared_dir
ownerships are user:group. Perms are user:group
ther, each of which has rwx options.