we have migrated to another server , after restoring accounts, all the ownerships and permissions were missed , like this :

drwxrwx--- 6 32330 mail 4096 Nov 23 12:03 ./
drwx--x--x 10 32330 342 4096 Mar 9 14:41 ../
drwxrwxrwx 2 32330 342 4096 Mar 5 18:38 cur/
-rwxrwxrwx 1 32330 mail 2070 Nov 23 12:03 inbox*
drwxrwxrwx 4 32330 mail 4096 Sep 26 08:21 root.acc/
drwxrwxrwx 2 32330 342 4096 Mar 5 18:37 new/
drwxrwxrwx 2 32330 342 4096 Mar 5 18:37 tmp/

how to chown all /home/users to their users ? 1600 accounts . . . its very difficault to run chown command for every user . . . cause 1600 accounts hosted on this server !
is there any way to fix this problem ?