Introduction
I would like to start that this is a systems administrator task and using the following is a use at your own risk how-to. This is mainly due to errors or damage that may occur if recursive changes are made mistakenly.
Procedure
Always use absolute paths to ensure your explicitly defining that path reducing chances of error. If users are created in /home and in this example the user is rocks then the path would be /home/rocks/public_html/ and the ownerships can be changed recursively for that absolute path with
chown --preserve-root -R rocks.rocks /home/rocks/public_html/{*,.[!.]*}
The wildcard at the end is so that the group on /home/rocks/public_html/ isn't changed and so all dot files/directories are included. That group will be set to nobody if file protect is enabled. You can check if file protect is enabled or not by checking if this file exists.
[root@cptestvm ~]# ls -al /var/cpanel/fileprotect
-rw-r--r-- 1 root root 0 Feb 10 04:31 /var/cpanel/fileprotect
[root@cptestvm ~]#
If that file doesn't exist then the users group will be set for /home/rocks/public_html/
Again, it is very important the path be correct set and that the path is an absolute path to the folder being changed solely for the purposes it makes very clear the path changes will be made.