Fresh installation is full of errors and barely works

Nextcloud version: 18.0.2
Operating system and version: Ubuntu 18.04 LTS
Apache or nginx version: Apache/2.4.29
PHP version: 7.4

The issue you are facing: Pretty much nothing works except uploading files, moving them around, deleting and downloading them. Any action from the notification panel returns “Failed to perform action”, no setting is getting saved, i can’t log out etc. The log is so full of errors and warnings that the Chrome webpage locks up. The installation went well and without any errors or hiccups whatsoever.

Is this the first time you’ve seen this error?: Yes

Steps to replicate it:

  1. Install the latest version on Ubuntu 18.04
  2. See behaviour

The output of your Nextcloud log in Admin > Logging:

https://i.imgur.com/i2NIXAL.png

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

<?php
$CONFIG = array (
  'instanceid' => 'XXXXXXX',
  'passwordsalt' => 'XXXXXXXXXXX',
  'secret' => 'XXXXXXXXXX',
  'trusted_domains' =>
  array (
    0 => 'XXXXXXXXXX',
  ),
  'datadirectory' => '/storage/files/',
  'dbtype' => 'mysql',
  'version' => '18.0.2.2',
  'overwrite.cli.url' => 'XXXXXXXXXXX',
  'dbname' => 'XXXXXXXX',
  'dbhost' => 'XXXXXXXXX',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'XXXXXXXXXXX',
  'dbpassword' => 'XXXXXXXXXX',
  'installed' => true,
  'overwrite.cli.url' => 'XXXXXXXX',
  'htaccess.RewriteBase' => '/',
);

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

[Tue Mar 17 13:37:03.291905 2020] [core:notice] [pid 31829] AH00094: Command line: '/usr/sbin/apache2'
[Tue Mar 17 13:37:06.204804 2020] [autoindex:error] [pid 31835] [client 162.158.18.124:33380] AH01276: Cannot serve directory /var/www/files/apps/files/: No matching DirectoryIndex (index.php,index.html) found, and server-generated directory index forbidden by Options directive

I cannot find anything useful online regarding the errors or a way to fix them, so any help would be appreciated.

Can you:

chown -R  www-data: www-data  /var/www/files/

The permissions are set properly to www-data.

Can you give me a screenshot of de location of nextcloud in the terminal with:

ls -l

Esspecialy for:
/var/www/files/3rdparty/

Root directory:

total 148
drwxr-xr-x 33 www-data www-data  4096 Mar 11 16:56 3rdparty
drwxr-xr-x 49 www-data www-data  4096 Mar 17 13:09 apps
-rw-r--r--  1 www-data www-data 15752 Mar 11 16:52 AUTHORS
drwxr-xr-x  2 www-data www-data  4096 Mar 17 14:19 config
-rw-r--r--  1 www-data www-data  3910 Mar 11 16:52 console.php
-rw-r--r--  1 www-data www-data 34520 Mar 11 16:52 COPYING
drwxr-xr-x 23 www-data www-data  4096 Mar 11 16:57 core
-rw-r--r--  1 www-data www-data  5048 Mar 11 16:52 cron.php
drwxr-xr-x  2 www-data www-data  4096 Mar 17 13:04 data
-rw-r--r--  1 www-data www-data   156 Mar 11 16:52 index.html
-rw-r--r--  1 www-data www-data  2976 Mar 11 16:52 index.php
drwxr-xr-x  6 www-data www-data  4096 Mar 11 16:52 lib
-rw-r--r--  1 www-data www-data   283 Mar 11 16:52 occ
drwxr-xr-x  2 www-data www-data  4096 Mar 11 16:52 ocm-provider
drwxr-xr-x  2 www-data www-data  4096 Mar 11 16:52 ocs
drwxr-xr-x  2 www-data www-data  4096 Mar 11 16:52 ocs-provider
-rw-r--r--  1 www-data www-data  3056 Mar 11 16:52 public.php
-rw-r--r--  1 www-data www-data  5235 Mar 11 16:52 remote.php
drwxr-xr-x  4 www-data www-data  4096 Mar 11 16:52 resources
-rw-r--r--  1 www-data www-data    26 Mar 11 16:52 robots.txt
-rw-r--r--  1 www-data www-data  2381 Mar 11 16:52 status.php
drwxr-xr-x  3 www-data www-data  4096 Mar 11 16:52 themes
drwxr-xr-x  2 www-data www-data  4096 Mar 11 16:53 updater
-rw-r--r--  1 www-data www-data   362 Mar 11 16:56 version.php

/var/www/files/3rdparty/:

total 288
-rw-r--r--  1 www-data www-data    178 Mar 11 16:52  autoload.php
drwxr-xr-x  3 www-data www-data   4096 Mar 11 16:52  aws
drwxr-xr-x  3 www-data www-data   4096 Mar 11 16:52  bantu
drwxr-xr-x  3 www-data www-data   4096 Mar 11 16:52  christophwurst
drwxr-xr-x  2 www-data www-data   4096 Mar 11 16:52  composer
-rw-r--r--  1 www-data www-data   1366 Mar 11 16:52  composer.json
-rw-r--r--  1 www-data www-data 146679 Mar 11 16:52  composer.lock
drwxr-xr-x  3 www-data www-data   4096 Mar 11 16:52  deepdiver
drwxr-xr-x  3 www-data www-data   4096 Mar 11 16:52  deepdiver1975
drwxr-xr-x 12 www-data www-data   4096 Mar 11 16:52  doctrine
drwxr-xr-x  3 www-data www-data   4096 Mar 11 16:52  egulias
drwxr-xr-x  7 www-data www-data   4096 Mar 11 16:52  guzzlehttp
drwxr-xr-x  4 www-data www-data   4096 Mar 11 16:52  icewind
drwxr-xr-x  3 www-data www-data   4096 Mar 11 16:52  interfasys
drwxr-xr-x  3 www-data www-data   4096 Mar 11 16:52  jeremeamia
drwxr-xr-x  3 www-data www-data   4096 Mar 11 16:52  justinrainbow
drwxr-xr-x  3 www-data www-data   4096 Mar 11 16:52  leafo
drwxr-xr-x  3 www-data www-data   4096 Mar 11 16:52  league
-rw-r--r--  1 www-data www-data    543 Mar 11 16:52 'LICENSE INFO'
drwxr-xr-x  4 www-data www-data   4096 Mar 11 16:52  microsoft
drwxr-xr-x  3 www-data www-data   4096 Mar 11 16:52  mtdowling
drwxr-xr-x  3 www-data www-data   4096 Mar 11 16:52  nikic
-rw-r--r--  1 www-data www-data    881 Mar 11 16:52  patches.txt
drwxr-xr-x  4 www-data www-data   4096 Mar 11 16:52  patchwork
drwxr-xr-x  6 www-data www-data   4096 Mar 11 16:52  pear
drwxr-xr-x  3 www-data www-data   4096 Mar 11 16:52  php-opencloud
drwxr-xr-x  3 www-data www-data   4096 Mar 11 16:52  phpseclib
drwxr-xr-x  3 www-data www-data   4096 Mar 11 16:52  pimple
drwxr-xr-x  5 www-data www-data   4096 Mar 11 16:52  psr
drwxr-xr-x  3 www-data www-data   4096 Mar 11 16:52  punic
drwxr-xr-x  3 www-data www-data   4096 Mar 11 16:52  ralouphie
drwxr-xr-x  3 www-data www-data   4096 Mar 11 16:52  react
-rw-r--r--  1 www-data www-data    267 Mar 11 16:52  README.md
drwxr-xr-x  8 www-data www-data   4096 Mar 11 16:52  sabre
drwxr-xr-x  3 www-data www-data   4096 Mar 11 16:52  stecman
drwxr-xr-x  3 www-data www-data   4096 Mar 11 16:52  swiftmailer
drwxr-xr-x 17 www-data www-data   4096 Mar 11 16:52  symfony

Thanks,

Is just see the error in apache:

/var/www/files/apps/files/

That is the line you have to fix

What do you mean fix? Can you be a bit more specific as to what I need to do?

Yes,

Can you give me the config of apache?

httpd-vhosts.conf

Or the config where you setup the location of youre apache files.

And the data is storage at: /storage/files/ correct?

And youre .htaccess

One of the errors read

Yes, the data storage is at that location.

Apache config part:

<VirtualHost *:80>

    ServerName XXXXXX

    DocumentRoot /var/www/files
    <Directory /var/www/files>
       Allow from all
       AllowOverride All
       Require all granted
       #Options FollowSymLinks MultiViews
       DirectoryIndex index.html index.php
    </Directory>

    ProxyPreserveHost On
    ProxyRequests off

</VirtualHost>

.htaccess:

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
</IfModule>
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1

<IfModule mod_php5.c>
   php_value error_reporting 22519
   php_flag allow_url_include 0
   php_flag allow_webdav_methods 1
   php_value memory_limit 256M
   php_value max_execution_time 300
   php_flag output_buffering 0
   php_flag zlib.output_compression 0
   php_flag file_uploads 1
   php_value max_file_uploads 10
   php_value upload_max_filesize 20M
   php_value post_max_size 20M
   php_flag enable_dl 0
   php_value default_charset 'UTF-8'
</IfModule>
<IfModule mod_php7.c>
    php_value error_reporting 22519
    php_flag allow_url_include 0
    php_flag allow_webdav_methods 1
    php_value memory_limit 256M
    php_value max_execution_time 300
    php_flag output_buffering 0
    php_flag zlib.output_compression 0
    php_flag file_uploads 1
    php_value max_file_uploads 10
    php_value upload_max_filesize 20M
    php_value post_max_size 20M
    php_flag enable_dl 0
    php_value default_charset 'UTF-8'
</IfModule>

<IfModule mod_dir.c>
  DirectoryIndex index.php index.html
</IfModule>

AddDefaultCharset utf-8
Options -Indexes
#### DO NOT CHANGE ANYTHING ABOVE THIS LINE ####

ErrorDocument 403 //
ErrorDocument 404 //
#### DO NOT CHANGE ANYTHING ABOVE THIS LINE ####

ErrorDocument 403 /
ErrorDocument 404 /
<IfModule mod_rewrite.c>
  Options -MultiViews
  RewriteRule ^core/js/oc.js$ index.php [PT,E=PATH_INFO:$1]
  RewriteRule ^core/preview.png$ index.php [PT,E=PATH_INFO:$1]
  RewriteCond %{REQUEST_FILENAME} !\.(css|js|svg|gif|png|html|ttf|woff2?|ico|jpg|jpeg|map|webm|mp4)$
  RewriteCond %{REQUEST_FILENAME} !core/img/favicon.ico$
  RewriteCond %{REQUEST_FILENAME} !core/img/manifest.json$
  RewriteCond %{REQUEST_FILENAME} !/remote.php
  RewriteCond %{REQUEST_FILENAME} !/public.php
  RewriteCond %{REQUEST_FILENAME} !/cron.php
  RewriteCond %{REQUEST_FILENAME} !/core/ajax/update.php
  RewriteCond %{REQUEST_FILENAME} !/status.php
  RewriteCond %{REQUEST_FILENAME} !/ocs/v1.php
  RewriteCond %{REQUEST_FILENAME} !/ocs/v2.php
  RewriteCond %{REQUEST_FILENAME} !/robots.txt
  RewriteCond %{REQUEST_FILENAME} !/updater/
  RewriteCond %{REQUEST_FILENAME} !/ocs-provider/
  RewriteCond %{REQUEST_FILENAME} !/ocm-provider/
  RewriteCond %{REQUEST_URI} !^/\.well-known/(acme-challenge|pki-validation)/.*
  RewriteRule . index.php [PT,E=PATH_INFO:$1]
  RewriteBase /
  <IfModule mod_env.c>
    SetEnv front_controller_active true
    <IfModule mod_dir.c>
      DirectorySlash off
    </IfModule>
  </IfModule>
</IfModule>