You can. The documentation says to do it like this:
chown -R www-data:www-data nextcloud
find nextcloud/ -type d -exec chmod 750 {} ;
find nextcloud/ -type f -exec chmod 640 {} ;
These examples use relative paths, so make sure they are correct for your system.