Change ownership of Nextcloud files (root to www-data)

Thanks for the quick reply. I am not unix proficient. Is it safe to just run
sudo chown -R www-data:www-data /var/www/nextcloud ? Or does that break anything else?