Error 500 after changing directory permissions

It seems that by entering the following command :

sudo chmod -R 777 /var/www/html

It has set the permissions that any one can write to.

So i can now see the front and back which is excellent :slightly_smiling_face:

However i still can’t figure out how to set the file permissions back to how they were before after following your How to install Magento 2.3 and build a web server