After update to 20.0.11.1: Nextcloud file transfer errors and Web UI not accessbile

Support intro

Hi

Directly after updating nextcloud to 20.0.11.1:

File directories can be browsed with the NC android app, files fail to uploaded or downloaded. 403 Forbidden error on upload from a desktop client. “Server in maintenance mode” error from an Android client.

Web UI login page is accessible. Correct credentials lead to an " Internal Server Error" incorrect details lead to a normal failed login.

[/tried]
Apps were during the upgrade, I used “occ” app:install Name to replace the last app in the hope it would help.

I created a new users with “occ” and that didn’t work any better

Recently I changed the HTTPS port away from 443, NC was working fine since then.

Nextcloud version: 20.0.11.1
Operating system and version : Debian GNU/Linux 10 \n \l (NextCloudPi on RPi4B 4gb)
Apache or nginx version : Apache/2.4.38 (Debian)
PHP version : PHP 7.3.29-1~deb10u1

The issue you are facing:

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

Steps to replicate it:

1a. Attempt to log in via the Web UI with valid credentials

1b. Attempt to upload a file with a NC client

The output of your Nextcloud log in Admin > Logging:

The level=0 entries have been ommited for space
Image strings have been replaced with "xxxxxx"
{"reqId":"YOb1GCzJOP5Qttcjx8JmCAAARRU","level":3,"time":"2021-07-08T12:52:43+00:00","remoteAddr":"102.140.11.111","user":"Adam2","app":"PHP","method":"GET","url":"/index.php/apps/dashboard/","message":{"Exception":"Error","Message":"file_put_contents(/var/www/nextcloud/data/appdata_ocwn0g3teaag/css/icons/icons-vars.css): failed to open stream: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#283","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::","args":[2,"file_put_contents(/var/www/nextcloud/data/appdata_ocwn0g3teaag/css/icons/icons-vars.css): failed to open stream: No such file or directory","/var/www/nextcloud/lib/private/Files/Storage/Local.php",283,{"path":"appdata_ocwn0g3teaag/css/icons/icons-vars.css","data":":root {\n--icon-confirm-fade-000: url(data:image/svg+xml;base64,xxxxx);--icon-search-fffffe: url(data:image/svg+xml;base64,xxxxx);--icon-add-000: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d$       "
{"reqId":"YOb1GCzJOP5Qttcjx8JmCAAARRU","level":3,"time":"2021-07-08T12:52:43+00:00","remoteAddr":"102.140.11.111","user":"Adam2","app":"index","method":"GET","url":"/index.php/apps/dashboard/","message":{"Exception":"OCP\\Files\\NotPermittedException","Message":"Could not create path","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/Files/SimpleFS/NewSimpleFile.php","line":133,"function":"newFile","class":"OC\\Files\\Node\\Folder","type":"->","args":["icons-vars.css",":root {\n--icon-confirm-fade-000: url(data:image/svg+xml;base64,xxxxx);--icon-search-fffffe: url(data:image/svg+xml;base64,xxxxx);--icon-add-000: url(data:image/svg+xml;base64,xxxxx);--icon-add-fff: url(data:image/svg+xml;base64,xxxxx     "
{"reqId":"YOb1GCzJOP5Qttcjx8JmCAAARRU","level":3,"time":"2021-07-08T12:52:43+00:00","remoteAddr":"102.140.11.111","user":"Adam2","app":"PHP","method":"GET","url":"/index.php/apps/dashboard/","message":{"Exception":"Error","Message":"file_put_contents(/var/www/nextcloud/data/appdata_ocwn0g3teaag/js/core/merged-template-prepend.js): failed to open stream: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#283","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::","args":[2,"file_put_contents(/var/www/nextcloud/data/appdata_ocwn0g3teaag/js/core/merged-template-prepend.js): failed to open stream: No such file or directory","/var/www/nextcloud/lib/private/Files/Storage/Local.php",283,{"path":"appdata_ocwn0g3teaag/js/core/merged-template-prepend.js","data":"/**\n * @author Roeland Jago Douma <roeland@famdouma.nl>\n *\n * @copyright Copyright (c) 2015, ownCloud, Inc.\n * @license AGPL-3.0\n *\n * This code is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License, version 3,\n * as published by the Free Software Foundation.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License, version 3,\n * along with this program.  If not, see <http://www.gnu.org/licenses/>\n *\n */\n\n/**\n * Namespace to hold functions related to convert mimetype to icons\n *\n * @namespace\n */\nOC.MimeType = {\n\n\t/**\n\t * Cache that maps mimeTypes to icon urls\n\t */\n\t_mimeTypeIcons: {},\n\n\t/**\n\t * Return the file icon we want to use for the given mimeType.\n\t$      "
{"reqId":"YOb1GCzJOP5Qttcjx8JmCAAARRU","level":3,"time":"2021-07-08T12:52:43+00:00","remoteAddr":"102.140.11.111","user":"Adam2","app":"no app in context","method":"GET","url":"/index.php/apps/dashboard/","message":"JSCombiner: unable to cache: merged-template-prepend.js","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36","version":"20.0.11.1"} 
{"reqId":"YOb1GCzJOP5Qttcjx8JmCAAARRU","level":3,"time":"2021-07-08T12:52:43+00:00","remoteAddr":"102.140.11.111","user":"Adam2","app":"PHP","method":"GET","url":"/index.php/apps/dashboard/","message":{"Exception":"Error","Message":"file_put_contents(/var/www/nextcloud/data/appdata_ocwn0g3teaag/js/activity/activity-sidebar.js): failed to open stream: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#283","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::","args":[2,"file_put_contents(/var/www/nextcloud/data/appdata_ocwn0g3teaag/js/activity/activity-sidebar.js): failed to open stream: No such file or directory","/var/www/nextcloud/lib/private/Files/Storage/Local.php",283,{"path":"appdata_ocwn0g3teaag/js/activity/activity-sidebar.js","data":"/**\n * @copyright (c) 2016 Joas Schilling <coding@schilljs.com>\n *\n * @author Joas Schilling <coding@schilljs.com>\n *\n * This file is licensed under the Affero General Public License version 3 or\n * later. See the COPYING file.\n */\n\n(function(OC, OCA) {\n\tOCA.Activity = OCA.Activity || {};\n\n\tOCA.Activity.RichObjectStringParser = {\n\t\tavatarsEnabled: true,\n\n\t\t/**\n\t\t * @param {string} message\n\t\t * @param {Object} parameters\n\t\t * @returns {string}\n\t\t */\n\t\tparseMessage: function(message, parameters) {\n\t\t\tmessage = escapeHTML(message);\n\t\t\tvar self = this,\n\t\t\t\tregex = /\\{([a-z\\-_0-9]+)\\}/gi,\n\t\t\t\tmatches = message.match(regex);\n\n\t\t\t_.each(matches, function(parameter) {\n\t\t\t\tparameter = parameter.substring(1, parameter.length - 1);\n\t\t\t\tif (!parameters.hasOwnProperty(parameter) || !parameters[parameter]) {\n\t\t\t\t\t// Malformed translation?\n\t\t\t\t\tconsole.error('Potential malformed ROS string: parameter {' + parameter + '} was found in the string but is missing from the param${"reqId":"YOb1GCzJOP5Qttcjx8JmCAAARRU","level":3,"time":"2021-07-08T12:52:43+00:00","remoteAddr":"102.140.11.111","user":"Adam2","app":"no app in context","method":"GET","url":"/index.php/apps/dashboard/","message":"JSCombiner: unable to cache: activity-sidebar.js","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36","version":"20.0.11.1"} 
{"reqId":"YOb1FizJOP5Qttcjx8JmBQAARRc","level":2,"time":"2021-07-08T12:52:49+00:00","remoteAddr":"102.140.11.111","user":"Adam2","app":"core","method":"GET","url":"/index.php/apps/theming/image/logo?v=0&useSvg=1","message":"Failed to compile and/or save /var/www/nextcloud/core/css/server.scss","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36","version":"20.0.11.1"}
{"reqId":"YOb1FizJOP5Qttcjx8JmBQAARRc","level":3,"time":"2021-07-08T12:52:49+00:00","remoteAddr":"102.140.11.111","user":"Adam2","app":"cssresourceloader","method":"GET","url":"/index.php/apps/theming/image/logo?v=0&useSvg=1","message":"Could not find resource css/server.css to load","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36","version":"20.0.11.1"}
{"reqId":"YOb1FizJOP5Qttcjx8JmBQAARRc","level":3,"time":"2021-07-08T12:52:49+00:00","remoteAddr":"102.140.11.111","user":"Adam2","app":"PHP","method":"GET","url":"/index.php/apps/theming/image/logo?v=0&useSvg=1","message":{"Exception":"Error","Message":"file_put_contents(/var/www/nextcloud/data/appdata_ocwn0g3teaag/css/core/cc12-2d68-css-variables.css): failed to open stream: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#283","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::","args":[2,"file_put_contents(/var/www/nextcloud/data/appdata_ocwn0g3teaag/css/core/cc12-2d68-css-variables.css): failed to open stream: No such file or directory","/var/www/nextcloud/lib/private/Files/Storage/Local.php",283,{"path":"appdata_ocwn0g3teaag/css/core/cc12-2d68-css-variables.css","data":":root{--color-main-text:#222;--color-main-background:#fff;--color-main-background-translucent:rgba(255, 255, 255, 1);--color-background-hover:#f5f5f5;--color-background-dark:#ededed;--color-background-darker:#dbdbdb;--color-placeholder-light:#e6e6e6;--color-placeholder-dark:#ccc;--color-primary:#0082c9;--color-primary-light:#e6f3fa;--color-primary-text:#fff;--color-primary-text-dark:#ededed;--color-primary-element:#0082c9;--color-primary-element-light:#17adff;--color-error:#e9322d;--color-warning:#eca700;--color-success:#46ba61;--color-text-maxcontrast:#767676;--color-text-light:#222;--color-text-lighter:#767676;--image-logo:url('/core/img/logo/logo.png?v=0');--image-login-background:url('/core/img/background.png?v=0');--image-logoheader:url('/core/img/logo/logo.png?v=0');--image-favicon:url('/core/img/logo/logo.png?v=0');--color-loading-light:#ccc;--color-loading-dark:#444;--color-box-shadow:rgba(77, 77, 77, 0.5);--color-border:#ededed;--color-border-dark:#dbdbdb;--border-radius:3px;--border-radius-large${"reqId":"YOb1FizJOP5Qttcjx8JmBQAARRc","level":3,"time":"2021-07-08T12:52:49+00:00","remoteAddr":"102.140.11.111","user":"Adam2","app":"scss_cacher","method":"GET","url":"/index.php/apps/theming/image/logo?v=0&useSvg=1","message":"SCSSCacher::cache unable to cache: css-variables.scss","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36","version":"20.0.11.1"}
{"reqId":"YOb1FizJOP5Qttcjx8JmBQAARRc","level":2,"time":"2021-07-08T12:52:49+00:00","remoteAddr":"102.140.11.111","user":"Adam2","app":"core","method":"GET","url":"/index.php/apps/theming/image/logo?v=0&useSvg=1","message":"Failed to compile and/or save /var/www/nextcloud/core/css/css-variables.scss","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36","version":"20.0.11.1"}
{"reqId":"YOb1FizJOP5Qttcjx8JmBQAARRc","level":3,"time":"2021-07-08T12:52:49+00:00","remoteAddr":"102.140.11.111","user":"Adam2","app":"cssresourceloader","method":"GET","url":"/index.php/apps/theming/image/logo?v=0&useSvg=1","message":"Could not find resource css/css-variables.css to load","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36","version":"20.0.11.1"}
{"reqId":"YOb1FizJOP5Qttcjx8JmBQAARRc","level":3,"time":"2021-07-08T12:52:49+00:00","remoteAddr":"102.140.11.111","user":"Adam2","app":"PHP","method":"GET","url":"/index.php/apps/theming/image/logo?v=0&useSvg=1","message":{"Exception":"Error","Message":"file_put_contents(/var/www/nextcloud/data/appdata_ocwn0g3teaag/css/icons/icons-vars.css): failed to open stream: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#283","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::","args":[2,"file_put_contents(/var/www/nextcloud/data/appdata_ocwn0g3teaag/css/icons/icons-vars.css): failed to open stream: No such file or directory","/var/www/nextcloud/lib/private/Files/Storage/Local.php",283,{"path":"appdata_ocwn0g3teaag/css/icons/icons-vars.css","data":":root {\n--icon-notifications-notifications-dark-000: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBoZWlnaHQ9IjE2IiB3aWR0aD0iMTYiIHZlcnNpb249IjEuMSIgdmlld0JveD0iMCAwIDE2IDE2Ij4KIDxwYXRoIGQ9Im04IDJjLTAuNTUyMyAwLTEgMC40NDc3LTEgMSAwIDAuMDQ3MiAwLjAyMSAwLjA4NzMgMC4wMjczIDAuMTMyOC0xLjczNjYgMC40MzYyLTMuMDI3MyAxLjk5NTMtMy4wMjczIDMuODY3MnYybC0xIDF2MWgxMHYtMWwtMS0xdi0yYzAtMS44NzE5LTEuMjkxLTMuNDMxLTMuMDI3My0zLjg2NzIgMC4wMDYzLTAuMDQ1NSAwLjAyNzMtMC4wODU2IDAuMDI3My0wLjEzMjggMC0wLjU1MjMtMC40NDc3LTEtMS0xem0tMiAxMGMwIDEuMTA0NiAwLjg5NTQgMiAyIDJzMi0wLjg5NTQgMi0yeiIgZmlsbD0iIzAwMCIvPgo8L3N2Zz4K);--icon-notifications-notifications-dark-fff: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBoZWlnaHQ9IjE2IiB3aWR0aD0iMTYiIHZlcnNpb249IjEuMSIgdmlld0JveD0iMCAwIDE2IDE2Ij4KIDxwYXRoIGQ9Im04IDJjLTAuNTUyMyAwLTEgMC40NDc3LTEgMSAwIDAuMDQ3MiAwLjAyMSAwLjA4NzMgMC4$
{"reqId":"YOb1FizJOP5Qttcjx8JmBQAARRc","level":3,"time":"2021-07-08T12:52:50+00:00","remoteAddr":"102.140.11.111","user":"Adam2","app":"index","method":"GET","url":"/index.php/apps/theming/image/logo?v=0&useSvg=1","message":{"Exception":"OCP\\Files\\NotPermittedException","Message":"Could not create path","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/Files/SimpleFS/NewSimpleFile.php","line":133,"function":"newFile","class":"OC\\Files\\Node\\Folder","type":"->","args":["icons-vars.css",":root {\n--icon-notifications-notifications-dark-000: url(data:image/svg+xml;base64,xxxxxx);--icon-notifications-notifications-dark-fff: url(data:image/svg+xml;base64,xxxxxxxx
{"reqId":"YOb1FizJOP5Qttcjx8JmBQAARRc","level":3,"time":"2021-07-08T12:52:50+00:00","remoteAddr":"102.140.11.111","user":"Adam2","app":"PHP","method":"GET","url":"/index.php/apps/theming/image/logo?v=0&useSvg=1","message":{"Exception":"Error","Message":"file_put_contents(/var/www/nextcloud/data/appdata_ocwn0g3teaag/js/core/merged-template-prepend.js): failed to open stream: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#283","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::","args":[2,"file_put_contents(/var/www/nextcloud/data/appdata_ocwn0g3teaag/js/core/merged-template-prepend.js): failed to open stream: No such file or directory","/var/www/nextcloud/lib/private/Files/Storage/Local.php",283,{"path":"appdata_ocwn0g3teaag/js/core/merged-template-prepend.js","data":"/**\n * @author Roeland Jago Douma <roeland@famdouma.nl>\n *\n * @copyright Copyright (c) 2015, ownCloud, Inc.\n * @license AGPL-3.0\n *\n * This code is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License, version 3,\n * as published by the Free Software Foundation.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License, version 3,\n * along with this program.  If not, see <http://www.gnu.org/licenses/>\n *\n */\n\n/**\n * Namespace to hold functions related to convert mimetype to icons\n *\n * @namespace\n */\nOC.MimeType = {\n\n\t/**\n\t * Cache that maps mimeTypes to icon urls\n\t */\n\t_mimeTypeIcons: {},\n\n\t/**\n\t * Return the file icon we want to use for th$
{"reqId":"YOb1FizJOP5Qttcjx8JmBQAARRc","level":3,"time":"2021-07-08T12:52:50+00:00","remoteAddr":"102.140.11.111","user":"Adam2","app":"no app in context","method":"GET","url":"/index.php/apps/theming/image/logo?v=0&useSvg=1","message":"JSCombiner: unable to cache: merged-template-prepend.js","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36","version":"20.0.11.1"}

The level=0 entries have been ommited for space

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

<?php
$CONFIG = array (
  'passwordsalt' => 'xxxxxxxxxxxxxxxxx',
  'secret' => 'xxxxxxxxxxxxxxx',
  'trusted_domains' =>
  array (
    0 => 'localhost',
    5 => 'nextcloudpi.local',
    7 => 'nextcloudpi',
    8 => 'nextcloudpi.lan',
    11 => 'xxxxxxxxxxxx',
    1 => '192.168.0.112',
    12 => 'xxxxxxxxxxxxx',
  ),
  'datadirectory' => '/var/www/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '20.0.11.1',
  'overwrite.cli.url' => 'https:// dyndns service : non standard port/',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'xxxxxxxxxxxxx',
  'dbpassword' => 'xxxxxxxxxxxxxxxxxxxxxx',
  'installed' => true,
  'instanceid' => 'ocwn0g3teaag',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 0.0,
    'password' => 'xxxxxxxxxxxxxxx',
  ),
  'tempdirectory' => '/var/www/nextcloud/data/tmp',
  'mail_smtpmode' => 'sendmail',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_from_address' => 'admin',
  'mail_domain' => 'xxxxxxxxxxx',
  'preview_max_x' => '2048',
  'preview_max_y' => '2048',
  'jpeg_quality' => '60',
  'overwriteprotocol' => 'https',
  'loglevel' => 0,
  'log_type' => 'file',
  'maintenance' => false,
  'theme' => '',
);

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

PASTE HERE

I tried this:

sudo -u www-data php occ maintenance:mode --on
sudo redis-cli -s /var/run/redis/redis.sock
auth XXXXXXXX
flushall (OK was response)
exit
sudo -u www-data php occ maintenance:mode --off
sudo -u www-data php occ files:scan --all

On the last line I hit this error:
sudo -u www-data php /var/www/nextcloud/occ files:scan --all
"
Starting scan for user 1 out of 4 (Adam)
Home storage for user Adam not writable
"

In previous attempts to sort this out today I’ve run
chown -R www-data:www-data /var/www/nextcloud/
So I am unsure why it would be unwritable

Folder permissions:
/var/www/nextcloud/data
drwxrwx— 6 www-data www-data 4096 Jul 8 15:20 data

/var/www/nextcloud/data/Adam
drwxr-xr-x 3 www-data www-data 4096 Jul 8 11:53 Adam
/var/www/nextcloud/data/files_external
drwxr-xr-x 2 www-data www-data 4096 Jul 8 11:51 files_external

so did it work?

I had the same issue, but no time to fix, so I just made a new installation and restored the backup, I felt that was quicker…

Hi Michuvon

Unfortunately it didn’t work. I landed up restoring a backup to the existing install, after a few hours of reading and playing around it was my best option.