The nextcloud user must access the directory: chown www-data:www-data /home/admin/nextcloud/data
(set correct nextcloud-userand nextcloud-group)
Look e.g. in /var/www/html/nextcloud for the user-group-combination.
Hope you installed all packages with your package manager (yum?) and not from a another source like windows-style (xampp).
I followed all your suggestions, but there was still an error.
First, I uninstalled the LAMPP. Then I installed Apache and Mariadb via Yum. then I put the nextcloud source in /var/www/html/nextcloud/
Second: I do not have the user “www-data”
[root @ localchange nextcloud] # sudo chown -R www-data: www-data config data apps
chown: invalid user: ‘www-data: www-data’
Nextcloud running as apache
[root @ localchange nextcloud] # pwd
/var/www/html/nextcloud
[root @ localchange nextcloud] # ls -ltr
a total of 112
-rwxr-xr-x. 1 apache apache 34520 Jun 9 14:34 COPYING
-rwxr-xr-x. 1 apache apache 15752 Jun 9 14:34 AUTHORS
drwxr-xr-x. 3 apache apache 35 Jun 9 14:34 themes
-rwxr-xr-x. 1 apache apache 2381 Jun 9 14:34 status.php
Third: se linux is disabled
[root@localchange nextcloud]# sestatus
SELinux status: disabled