Check out example codes for "what permissions should var/www/html have". It will help you in understanding the concepts better.

Code Example 1

sudo chown -R www-data:www-data /var/www/html

Learn ReactJs, React Native from akashmittal.com