SELinux Configuration
When you have SELinux enabled on your Linux distribution, you may face permissions problems.
Most of us immediately disable SELinux to raid out the issue but don’t disable the selinux it is security risk.
Use the below settings which will work for most SELinux systems that use the default distro profiles.
Also remember to modify the filepaths in these examples for your installation.
# semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/data' restorecon '/var/www/html/nextcloud/data' # semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/config' restorecon '/var/www/html/nextcloud/config' # semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/apps' restorecon '/var/www/html/nextcloud/apps'
Finally restart Apache
[For systemd] $ sudo systemctl restart httpd [For SysVinit system] $ sudo service httpd restart
Setup Nextcloud via web installer
Navigate your browser to http://Your-IP/nextcloud, Enter the username, password & MariaDB details, then hit Finish Setup button. It will take a while to complete the setup and you will be redirected to admin page.