Fix permissions for training VM
Fix permissions for training VM

This commit changes a number of places where `sudo` is used to run script to run under `root` rather than the `deploy` user. It also changes the permissions of the web root to include the `deploy` group which is used by the web server.

alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet