Migration from owncloud 8.2 failing

I am running into a problem migrating from owncloud 8.2 to the relevant version of nextcloud.
I am running the auto migrate index.php file

I am getting the following error.
" The following places cannot be written to "
It is mainly pointing to the updater/ directory

I have already chmod -R 777 updater/ directory

Should I go with a manual migrate instead?
Any feedback would be appreciated.

Thanks
John

This has been resolved now by doing
chown -R www-data:www-data /var/www/owncloud/