Use the following linux command to set the PHP user (www-data) as the owner of all assets within a directory:
chown -R www-data:www-data /var/www/html
Note: This is commonly done when a git pull is processed, or when setting up a new PHP web app, like a wordpress site. It is not unusual to see 500 errors due to www-data not having the correct ownership of assets in a web directory.