I have this error:
chown: missing operand after 'www-data:www-data/var/www/'
There is a missing white space in your command. Probably you want to:
sudo chown -R www-data:www-data /var/www/
In your case, the chown
command will search for a group called www-data/var/www/
(that is threat as single string), and complains about a missing argument - the target path.