A question can only have one accepted answer. Are you sure you want to replace the current answer with this one?
You previously marked this answer as accepted. Are you sure you want to unaccept it?
/var/wwwdirectory is owned by
www-data:www-data; by executing, in a terminal,
sudo chown -R www-data:www-data /var/www
www-data:www-datagroup, by executing:
sudo usermod -a -G www-data username