Hi everyone,
I was getting this error but I believe it might be a simple fix. At least it was for me. Change the owner and group of your site files and directories to the web server user and group respectively. If anyone needs help with this send me a message.
sudo chown www-data:www-data /var/www/html -R
-Best regards