Nextcloud 20.0.7 on CentoS 8 not work

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 20.0.7
Operating system and version (eg, Ubuntu 20.04): CentOS 8 stream full updated
Apache or nginx version (eg, Apache 2.4.25): apache 2.4.37
PHP version (eg, 7.4): 7.4.15

The issue you are facing:

installing nextcloud following instruction on nextcloud web site
https://docs.nextcloud.com/server/20/admin_manual/installation/example_centos.html

i can successfull get web page for setup data folder and database, but after cannot login anymore.

Is this the first time you’ve seen this error? (Y/N): N

Steps to replicate it:

  1. install centos 8 stream with development group
  2. install nextcloud as per guide on Example installation on CentOS 8 — Nextcloud latest Administration Manual latest documentation

The output of your Nextcloud log in Admin > Logging:

{"reqId":"YCOm44b7qjnL610VLEu@8gAAAIE","level":2,"time":"2021-02-10T09:26:59+00:00","remoteAddr":"10.1.20.38","user":"--","app":"no app in context","method":"POST","url":"/index.php/index.php","message":"Could not detect any host in http:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0","version":""}
{"reqId":"YCOm44b7qjnL610VLEu@8gAAAIE","level":2,"time":"2021-02-10T09:26:59+00:00","remoteAddr":"10.1.20.38","user":"--","app":"no app in context","method":"POST","url":"/index.php/index.php","message":"Could not detect any host in https:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0","version":""}
{"reqId":"YCOndl2GDpxbNmkKn-sbOwAAAAg","level":3,"time":"2021-02-10T09:29:26+00:00","remoteAddr":"10.1.20.38","user":"--","app":"index","method":"GET","url":"/index.php/apps/accessibility/css/user-a82fd95db10ff25dfad39f07372ebe37","message":{"Exception":"OCP\\Files\\NotPermittedException","Message":"Could not create folder","Code":0,"Trace":[{"file":"/var/www/html/nextcloud/lib/private/Files/AppData/AppData.php","line":157,"function":"newFolder","class":"OC\\Files\\Node\\Folder","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Template/IconsCacher.php","line":90,"function":"newFolder","class":"OC\\Files\\AppData\\AppData","type":"->"},{"function":"__construct","class":"OC\\Template\\IconsCacher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":101,"function":"newInstanceArgs","class":"ReflectionClass","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":109,"function":"buildClass","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":126,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/ServerContainer.php","line":156,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":430,"function":"query","class":"OC\\ServerContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":87,"function":"query","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":101,"function":"array_map"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":109,"function":"buildClass","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":126,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":455,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":427,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/App.php","line":139,"function":"query","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Route/Router.php","line":309,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/html/nextcloud/lib/base.php","line":1008,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/html/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/html/nextcloud/lib/private/Files/Node/Folder.php","Line":167,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0","version":"20.0.7.1"}

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => 'xxxxxxxxx',
  'passwordsalt' => 'xxxxxxxxxx',
  'secret' => 'Xxxxxxxxxxx',
  'trusted_domains' => 
  array (
    0 => 'nextcloud.yyyyyyyy.net',
  ),
  'datadirectory' => '/var/www/html/nextcloud/data',
  'dbtype' => 'sqlite3',
  'version' => '20.0.7.1',
  'overwrite.cli.url' => 'http://nextcloud.yyyyyyyy.net',
  'installed' => true,
  'maintenance' => false,
);

The output of your Apache/nginx/system log in /var/log/:

10.1.20.38 - - [10/Feb/2021:10:29:26 +0100] "GET /core/img/background.png?v=0 HTTP/1.1" 200 9621 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
10.1.20.38 - - [10/Feb/2021:10:29:26 +0100] "GET /index.php/svg/core/logo/logo?color=fff&v=1 HTTP/1.1" 200 321 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
10.1.20.38 - - [10/Feb/2021:10:29:27 +0100] "GET /core/img/loading-dark.gif HTTP/1.1" 200 4683 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
10.1.20.38 - - [10/Feb/2021:10:29:27 +0100] "GET /core/img/actions/toggle.svg HTTP/1.1" 200 308 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
10.1.20.38 - - [10/Feb/2021:10:29:27 +0100] "GET /core/img/actions/confirm-white.svg?v=2 HTTP/1.1" 200 405 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
10.1.20.38 - - [10/Feb/2021:10:29:27 +0100] "GET /cron.php HTTP/1.1" 200 20 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
10.1.20.38 - - [10/Feb/2021:10:29:27 +0100] "GET /index.php/apps/theming/favicon?v=0 HTTP/1.1" 200 90022 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
10.1.20.38 - - [10/Feb/2021:10:29:27 +0100] "GET /index.php/apps/theming/icon?v=0 HTTP/1.1" 200 25145 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
10.1.20.38 - - [10/Feb/2021:10:29:27 +0100] "GET /index.php/login?redirect_url=/index.php/core/apps/recommended HTTP/1.1" 200 4837 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
10.1.20.38 - - [10/Feb/2021:10:29:27 +0100] "GET /apps/files_rightclick/css/app.css?v=46c85d58-0 HTTP/1.1" 200 412 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
10.1.20.38 - - [10/Feb/2021:10:29:27 +0100] "GET /core/js/dist/files_fileinfo.js?v=57491e95-0 HTTP/1.1" 200 31003 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
10.1.20.38 - - [10/Feb/2021:10:29:27 +0100] "GET /core/js/backgroundjobs.js?v=57491e95-0 HTTP/1.1" 200 943 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
10.1.20.38 - - [10/Feb/2021:10:29:27 +0100] "GET /apps/files_sharing/js/dist/main.js?v=57491e95-0 HTTP/1.1" 200 1178 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
10.1.20.38 - - [10/Feb/2021:10:29:27 +0100] "GET /core/js/dist/files_client.js?v=57491e95-0 HTTP/1.1" 200 126285 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
10.1.20.38 - - [10/Feb/2021:10:29:27 +0100] "GET /apps/files_pdfviewer/js/files_pdfviewer-public.js?v=57491e95-0 HTTP/1.1" 200 20798 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
10.1.20.38 - - [10/Feb/2021:10:29:27 +0100] "GET /index.php/js/core/merged-template-prepend.js?v=57491e95-0 HTTP/1.1" 200 2982 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
10.1.20.38 - - [10/Feb/2021:10:29:27 +0100] "GET /index.php/apps/theming/styles?v=0 HTTP/1.1" 200 1275 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
10.1.20.38 - - [10/Feb/2021:10:29:27 +0100] "GET /apps/files_videoplayer/js/main.js?v=57491e95-0 HTTP/1.1" 200 6925 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
10.1.20.38 - - [10/Feb/2021:10:29:27 +0100] "GET /apps/files_rightclick/js/script.js?v=57491e95-0 HTTP/1.1" 200 14871 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
10.1.20.38 - - [10/Feb/2021:10:29:27 +0100] "GET /apps/files_rightclick/js/files.js?v=57491e95-0 HTTP/1.1" 200 4760 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
10.1.20.38 - - [10/Feb/2021:10:29:27 +0100] "GET /core/css/guest.css?v=57491e95-0 HTTP/1.1" 200 20937 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
10.1.20.38 - - [10/Feb/2021:10:29:27 +0100] "GET /apps/theming/js/theming.js?v=57491e95-0 HTTP/1.1" 200 60 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
10.1.20.38 - - [10/Feb/2021:10:29:27 +0100] "GET /core/js/dist/main.js?v=57491e95-0 HTTP/1.1" 200 1443329 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
10.1.20.38 - - [10/Feb/2021:10:29:27 +0100] "GET /core/js/dist/login.js?v=57491e95-0 HTTP/1.1" 200 845528 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
10.1.20.38 - - [10/Feb/2021:10:29:27 +0100] "GET /index.php/apps/accessibility/css/user-a82fd95db10ff25dfad39f07372ebe37 HTTP/1.1" 200 2677 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
10.1.20.38 - - [10/Feb/2021:10:29:27 +0100] "GET /core/img/background.png?v=0 HTTP/1.1" 200 9621 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
10.1.20.38 - - [10/Feb/2021:10:29:27 +0100] "GET /index.php/svg/core/logo/logo?color=fff&v=1 HTTP/1.1" 200 321 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
10.1.20.38 - - [10/Feb/2021:10:29:28 +0100] "GET /core/img/loading-dark.gif HTTP/1.1" 200 4683 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
10.1.20.38 - - [10/Feb/2021:10:29:28 +0100] "GET /core/img/actions/toggle.svg HTTP/1.1" 200 308 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
10.1.20.38 - - [10/Feb/2021:10:29:28 +0100] "GET /core/img/actions/confirm-white.svg?v=2 HTTP/1.1" 200 405 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
10.1.20.38 - - [10/Feb/2021:10:29:28 +0100] "GET /index.php/apps/theming/icon?v=0 HTTP/1.1" 200 25145 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
10.1.20.38 - - [10/Feb/2021:10:29:28 +0100] "GET /index.php/apps/theming/favicon?v=0 HTTP/1.1" 200 90022 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
10.1.20.38 - - [10/Feb/2021:10:29:28 +0100] "GET /cron.php HTTP/1.1" 200 20 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
10.1.20.38 - - [10/Feb/2021:10:29:33 +0100] "POST /index.php/login HTTP/1.1" 303 - "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
10.1.20.38 - - [10/Feb/2021:10:29:33 +0100] "GET /index.php/core/apps/recommended HTTP/1.1" 303 - "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
10.1.20.38 - - [10/Feb/2021:10:29:33 +0100] "GET /index.php/login?redirect_url=/index.php/core/apps/recommended HTTP/1.1" 200 4839 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
10.1.20.38 - - [10/Feb/2021:10:29:34 +0100] "GET /cron.php HTTP/1.1" 200 20 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
10.1.20.38 - - [10/Feb/2021:10:32:24 +0100] "POST /index.php/login HTTP/1.1" 303 - "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
10.1.20.38 - - [10/Feb/2021:10:32:24 +0100] "GET /index.php/core/apps/recommended HTTP/1.1" 303 - "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
10.1.20.38 - - [10/Feb/2021:10:32:24 +0100] "GET /index.php/login?redirect_url=/index.php/core/apps/recommended HTTP/1.1" 200 4835 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
10.1.20.38 - - [10/Feb/2021:10:32:25 +0100] "GET /index.php/apps/theming/icon?v=0 HTTP/1.1" 200 25145 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
10.1.20.38 - - [10/Feb/2021:10:32:25 +0100] "GET /cron.php HTTP/1.1" 200 20 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
10.1.20.38 - - [10/Feb/2021:10:32:27 +0100] "POST /index.php/login HTTP/1.1" 303 - "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
10.1.20.38 - - [10/Feb/2021:10:32:27 +0100] "GET /index.php/core/apps/recommended HTTP/1.1" 303 - "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
10.1.20.38 - - [10/Feb/2021:10:32:27 +0100] "GET /index.php/login?redirect_url=/index.php/core/apps/recommended HTTP/1.1" 200 4834 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
10.1.20.38 - - [10/Feb/2021:10:32:27 +0100] "GET /cron.php HTTP/1.1" 200 20 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
10.1.20.38 - - [10/Feb/2021:10:44:28 +0100] "GET /index.php/csrftoken HTTP/1.1" 200 121 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"

already fixed permission with PHP FPM session files:

chcon -R -t httpd_sys_rw_content_t /var/lib/php/session
chown -R apache:apache /var/lib/php/session
semanage fcontext -a -t httpd_sys_rw_content_t /var/lib/php/session
restorecon -v “/var/lib/php/session”

tried also to disable SELINUX, but no success.

apache have write permission:

unconfined_u:object_r:httpd_sys_content_t:s0 3rdparty
unconfined_u:object_r:httpd_sys_rw_content_t:s0 apps
unconfined_u:object_r:httpd_sys_content_t:s0 AUTHORS
unconfined_u:object_r:httpd_sys_rw_content_t:s0 config
unconfined_u:object_r:httpd_sys_content_t:s0 console.php
unconfined_u:object_r:httpd_sys_content_t:s0 COPYING
unconfined_u:object_r:httpd_sys_content_t:s0 core
unconfined_u:object_r:httpd_sys_content_t:s0 cron.php
unconfined_u:object_r:httpd_sys_rw_content_t:s0 data
unconfined_u:object_r:httpd_sys_content_t:s0 index.html
unconfined_u:object_r:httpd_sys_content_t:s0 index.php
unconfined_u:object_r:httpd_sys_content_t:s0 lib
unconfined_u:object_r:httpd_sys_content_t:s0 occ
unconfined_u:object_r:httpd_sys_content_t:s0 ocm-provider
unconfined_u:object_r:httpd_sys_content_t:s0 ocs
unconfined_u:object_r:httpd_sys_content_t:s0 ocs-provider
unconfined_u:object_r:httpd_sys_content_t:s0 public.php
unconfined_u:object_r:httpd_sys_content_t:s0 remote.php
unconfined_u:object_r:httpd_sys_content_t:s0 resources
unconfined_u:object_r:httpd_sys_content_t:s0 robots.txt
unconfined_u:object_r:httpd_sys_content_t:s0 status.php
unconfined_u:object_r:httpd_sys_content_t:s0 themes
unconfined_u:object_r:httpd_sys_content_t:s0 updater
unconfined_u:object_r:httpd_sys_content_t:s0 version.php

and nextcloud can write files on data folder:

[root@nextcloud data]# ll
total 984
drwxr-xr-x. 3 apache apache 19 Feb 10 10:27 admin
drwxr-xr-x. 6 apache apache 58 Feb 10 10:29 appdata_oc5xb3l5lbwj
-rw-r–r--. 1 apache apache 0 Feb 10 10:27 index.html
-rw-r-----. 1 apache apache 4337 Feb 10 10:29 nextcloud.log
-rw-r–r--. 1 apache apache 999424 Feb 10 10:32 owncloud.db
[root@nextcloud data]# pwd
/var/www/html/nextcloud/data
[root@nextcloud data]#

tried to setup also with sqlite, but problem persist.