The httpd process runs with apache
user/group credential, while /var/www/html folder is owned by root
user/group.
What's the best practice to manage permissions on public html folder? Leave them as owned by root
or assign each file and folder to the apache
user?
Leave them owned as root until some other user needs write access to the folders. The apache user should not own anything at all unless it is strictly necessary, as it can make security vulnerabilities worse. As an example, if somehow an attacker was able to figure out a way to get apache to be able to create files somewhere on your machine, if apache can create new files in /var/www/html, the attacker can make a new .php file which does whatever he wants using the apache credentials by hitting this php page with his web browser.
There is no canonical way to manage this setup. However, I take the view that root access should only be used when abosoutely required.
Due to this, I set the /var/www/html directory to a normal user, e.g. webmaster. This way routine access for web related files does not require root access.
Directories requiring write access by apache will either need world write permissions, be owned by apache, or setup group access.
There is a good review of using using sticky groups here: https://stackoverflow.com/questions/2560762/php-mkdir-and-apache-ownership