Internael Server Error after update to 20, Any Help please

Nextcloud version (eg, 18.0.2): 20.0.0.9
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.41 (Ubuntu)
PHP version (eg, 7.1): PHP 7.4.3 (cli)

The issue you are facing:
After I updated to Nextcloud 20 I get a internal Server Error

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

Steps to replicate it:
https://docs.nextcloud.com/server/20/admin_manual/maintenance/manual_upgrade.html

  1. Backup the web files to /NSCS
  2. download the new version
  3. run ‘sudo -u www-data php occ upgrade’

The output of your Nextcloud log in Admin > Logging:
Last 10 Lines of /data/nextcloud.log

{"reqId":"vXssUvCxIjWZE3g6Zw82","level":1,"time":"2020-10-05T11:33:51+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Deprecated event type for \\OC\\Repair::step: Symfony\\Component\\EventDispatcher\\GenericEvent is used","userAgent":"--","version":"19.0.3.1"}
{"reqId":"vXssUvCxIjWZE3g6Zw82","level":1,"time":"2020-10-05T11:33:51+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Deprecated event type for \\OC\\Repair::step: Symfony\\Component\\EventDispatcher\\GenericEvent is used","userAgent":"--","version":"19.0.3.1"}
{"reqId":"vXssUvCxIjWZE3g6Zw82","level":1,"time":"2020-10-05T11:33:51+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Deprecated event type for \\OC\\Repair::step: Symfony\\Component\\EventDispatcher\\GenericEvent is used","userAgent":"--","version":"19.0.3.1"}
{"reqId":"vXssUvCxIjWZE3g6Zw82","level":1,"time":"2020-10-05T11:33:51+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Deprecated event type for \\OC\\Repair::step: Symfony\\Component\\EventDispatcher\\GenericEvent is used","userAgent":"--","version":"19.0.3.1"}
{"reqId":"vXssUvCxIjWZE3g6Zw82","level":1,"time":"2020-10-05T11:33:51+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Remove old dashboard app config data","userAgent":"--","version":"19.0.3.1"}
{"reqId":"vXssUvCxIjWZE3g6Zw82","level":1,"time":"2020-10-05T11:33:51+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::startCheckCodeIntegrity: Starting code integrity check...","userAgent":"--","version":"19.0.3.1"}
{"reqId":"vXssUvCxIjWZE3g6Zw82","level":1,"time":"2020-10-05T11:34:55+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::finishedCheckCodeIntegrity: Finished code integrity check","userAgent":"--","version":"19.0.3.1"}
{"reqId":"vXssUvCxIjWZE3g6Zw82","level":1,"time":"2020-10-05T11:34:55+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::updateEnd: Update successful","userAgent":"--","version":"20.0.0.9"}
{"reqId":"vXssUvCxIjWZE3g6Zw82","level":1,"time":"2020-10-05T11:34:55+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::maintenanceActive: Maintenance mode is kept active","userAgent":"--","version":"20.0.0.9"}
{"reqId":"vXssUvCxIjWZE3g6Zw82","level":1,"time":"2020-10-05T11:34:55+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::resetLogLevel: Reset log level to Warning(2)","userAgent":"--","version":"20.0.0.9"}

The output of your config.php file in /home/cloud/public_html/config (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'passwordsalt' => '***',
  'secret' => '***',
  'trusted_domains' => 
  array (
    0 => 'cloud.sturtz.ml',
  ),
  'datadirectory' => '/data',
  'htaccess.RewriteBase' => '/',
  'dbtype' => 'mysql',
  'version' => '20.0.0.9',
  'overwrite.cli.url' => 'https://cloud.sturtz.ml',
  'dbname' => '***',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'SC_',
  'mysql.utf8mb4' => true,
  'dbuser' => '***',
  'dbpassword' => '***',
  'installed' => true,
  'instanceid' => '***',
  'mail_smtpmode' => 'sendmail',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'no.reply',
  'mail_domain' => '***',
  'maintenance' => false,
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'user_sql.db.database' => '***',
  'user_sql.db.hostname' => 'localhost',
  'user_sql.db.password' => '***',
  'user_sql.db.username' => '***',
  'loglevel' => 2,
);

The output of your Apache/nginx/system log in /var/log/virtualmin/cloud.sturtz.ml_error_log:
Last 10 Lines

[Mon Oct 05 07:10:18.790073 2020] [fcgid:warn] [pid 1825321] [client 192.168.1.6:59971] mod_fcgid: stderr: {"reqId":"LtGuy71t4OdQY7G1Qdhy","level":3,"time":"2020-10-05T12:10:18+00:00","remoteAddr":"192.168.1.6","user":"--","app":"index","method":"GET","url":"/","message":{"Exception":"Doctrine\\\\DBAL\\\\DBALException","Message":"Failed to connect to the database: An exception occurred in driver: could not find driver","Code":0,"Trace":[{"file":"/home/cloud/public_html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php","line":1449,"function":"connect","class":"OC\\\\DB\\\\Connection","type":"->"},{"file":"/home/cloud/public_html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php","line":892,"function":"getWrappedConnection","class":"Doctrine\\\\DBAL\\\\Connection","type":"->"},{"file":"/home/cloud/public_html/lib/private/DB/Connection.php","line":194,"function":"executeQuery","class":"Doctrine\\\\DBAL\\\\Connection","type":"->"},{"file":"/home/cloud/public_html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php","line":206,"function":"executeQuery","class":"OC\\\\DB\\\\Connection","type":"->"},{"file":"/home/cloud/public_html/lib/private/DB/QueryBuilder/QueryBuilder.php","line":217,"function":"execute","class":"Doctrine\\\\DBAL\\\\Query\\\\QueryBuilder","type":"->"},{"file":"/home/cloud/public_html/lib/private/AppConfig.php","line":332,"function":"execute","class":"OC\\\\DB\\\\QueryBuilder\\\\QueryBuilder","type":"->"},{"file":"/home/cloud/public_html/lib/private/AppConfig.php","line":110,"function":"loadConfigValues","class":"OC\\\\AppConfig","type":"->"},{"file":"/home/cloud/public_html/lib/private/AppConfig.php","line":288,"function":"getApps","class":"OC\\\\AppConfig","type":"->"},{"file":"/home/cloud/public_html/lib/private/App/AppManager.php","line":136,"function":"getValues","class":"OC\\\\AppConfig","type":"->"},{"file":"/home/cloud/public_html/lib/private/App/AppManager.php","line":225,"functi
[Mon Oct 05 07:10:18.792347 2020] [fcgid:warn] [pid 1825321] [client 192.168.1.6:59971] mod_fcgid: stderr: ass":"OC\\\\App\\\\AppManager","type":"->"},{"file":"/home/cloud/public_html/index.php","line":45,"function":"printErrorPage","class":"OC_Template","type":"::"}],"File":"/home/cloud/public_html/lib/private/DB/Connection.php","Line":67,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36","version":""}
[Mon Oct 05 07:10:18.792366 2020] [fcgid:warn] [pid 1825321] [client 192.168.1.6:59971] mod_fcgid: stderr: {"reqId":"LtGuy71t4OdQY7G1Qdhy","level":3,"time":"2020-10-05T12:10:18+00:00","remoteAddr":"192.168.1.6","user":"--","app":"PHP","method":"GET","url":"/","message":"fopen(/home/cloud/public_html/data/nextcloud.log): failed to open stream: No such file or directory at /home/cloud/public_html/lib/private/Log/File.php#85","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36","version":""}
[Mon Oct 05 07:11:55.220194 2020] [fcgid:warn] [pid 1824837] [client 192.168.1.6:60048] mod_fcgid: stderr: {"reqId":"o46SN4CbH8fQz7GIL9a4","level":3,"time":"2020-10-05T12:11:55+00:00","remoteAddr":"192.168.1.6","user":"--","app":"PHP","method":"GET","url":"/","message":{"Exception":"Error","Message":"touch(): Utime failed: Permission denied at /home/cloud/public_html/lib/private/Config.php#242","Code":0,"Trace":[{"function":"onError","class":"OC\\\\Log\\\\ErrorHandler","type":"::"},{"file":"/home/cloud/public_html/lib/private/Config.php","line":242,"function":"touch"},{"file":"/home/cloud/public_html/lib/private/Config.php","line":134,"function":"writeData","class":"OC\\\\Config","type":"->"},{"file":"/home/cloud/public_html/lib/private/SystemConfig.php","line":111,"function":"setValue","class":"OC\\\\Config","type":"->"},{"file":"/home/cloud/public_html/lib/private/legacy/OC_Util.php","line":1167,"function":"setValue","class":"OC\\\\SystemConfig","type":"->"},{"file":"/home/cloud/public_html/lib/base.php","line":421,"function":"getInstanceId","class":"OC_Util","type":"::"},{"file":"/home/cloud/public_html/lib/base.php","line":650,"function":"initSession","class":"OC","type":"::"},{"file":"/home/cloud/public_html/lib/base.php","line":1092,"function":"init","class":"OC","type":"::"},{"file":"/home/cloud/public_html/index.php","line":35,"args":["/home/cloud/public_html/lib/base.php"],"function":"require_once"}],"File":"/home/cloud/public_html/lib/private/Log/ErrorHandler.php","Line":91,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36","version":""}
[Mon Oct 05 07:11:55.220240 2020] [fcgid:warn] [pid 1824837] [client 192.168.1.6:60048] mod_fcgid: stderr: {"reqId":"o46SN4CbH8fQz7GIL9a4","level":3,"time":"2020-10-05T12:11:55+00:00","remoteAddr":"192.168.1.6","user":"--","app":"PHP","method":"GET","url":"/","message":{"Exception":"Error","Message":"fopen(/home/cloud/public_html/config/config.php): failed to open stream: Permission denied at /home/cloud/public_html/lib/private/Config.php#243","Code":0,"Trace":[{"function":"onError","class":"OC\\\\Log\\\\ErrorHandler","type":"::"},{"file":"/home/cloud/public_html/lib/private/Config.php","line":243,"function":"fopen"},{"file":"/home/cloud/public_html/lib/private/Config.php","line":134,"function":"writeData","class":"OC\\\\Config","type":"->"},{"file":"/home/cloud/public_html/lib/private/SystemConfig.php","line":111,"function":"setValue","class":"OC\\\\Config","type":"->"},{"file":"/home/cloud/public_html/lib/private/legacy/OC_Util.php","line":1167,"function":"setValue","class":"OC\\\\SystemConfig","type":"->"},{"file":"/home/cloud/public_html/lib/base.php","line":421,"function":"getInstanceId","class":"OC_Util","type":"::"},{"file":"/home/cloud/public_html/lib/base.php","line":650,"function":"initSession","class":"OC","type":"::"},{"file":"/home/cloud/public_html/lib/base.php","line":1092,"function":"init","class":"OC","type":"::"},{"file":"/home/cloud/public_html/index.php","line":35,"args":["/home/cloud/public_html/lib/base.php"],"function":"require_once"}],"File":"/home/cloud/public_html/lib/private/Log/ErrorHandler.php","Line":91,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36","version":""}
[Mon Oct 05 07:11:55.220257 2020] [fcgid:warn] [pid 1824837] [client 192.168.1.6:60048] mod_fcgid: stderr: {"reqId":"o46SN4CbH8fQz7GIL9a4","level":3,"time":"2020-10-05T12:11:55+00:00","remoteAddr":"192.168.1.6","user":"--","app":"PHP","method":"GET","url":"/","message":{"Exception":"Error","Message":"chmod(): Operation not permitted at /home/cloud/public_html/lib/private/Config.php#246","Code":0,"Trace":[{"function":"onError","class":"OC\\\\Log\\\\ErrorHandler","type":"::"},{"file":"/home/cloud/public_html/lib/private/Config.php","line":246,"function":"chmod"},{"file":"/home/cloud/public_html/lib/private/Config.php","line":134,"function":"writeData","class":"OC\\\\Config","type":"->"},{"file":"/home/cloud/public_html/lib/private/SystemConfig.php","line":111,"function":"setValue","class":"OC\\\\Config","type":"->"},{"file":"/home/cloud/public_html/lib/private/legacy/OC_Util.php","line":1167,"function":"setValue","class":"OC\\\\SystemConfig","type":"->"},{"file":"/home/cloud/public_html/lib/base.php","line":421,"function":"getInstanceId","class":"OC_Util","type":"::"},{"file":"/home/cloud/public_html/lib/base.php","line":650,"function":"initSession","class":"OC","type":"::"},{"file":"/home/cloud/public_html/lib/base.php","line":1092,"function":"init","class":"OC","type":"::"},{"file":"/home/cloud/public_html/index.php","line":35,"args":["/home/cloud/public_html/lib/base.php"],"function":"require_once"}],"File":"/home/cloud/public_html/lib/private/Log/ErrorHandler.php","Line":91,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36","version":""}
[Mon Oct 05 07:11:55.220278 2020] [fcgid:warn] [pid 1824837] [client 192.168.1.6:60048] mod_fcgid: stderr: {"reqId":"o46SN4CbH8fQz7GIL9a4","level":3,"time":"2020-10-05T12:11:55+00:00","remoteAddr":"192.168.1.6","user":"--","app":"index","method":"GET","url":"/","message":{"Exception":"OC\\\\HintException","Message":"Can't write into config directory!","Code":0,"Trace":[{"file":"/home/cloud/public_html/lib/private/Config.php","line":134,"function":"writeData","class":"OC\\\\Config","type":"->"},{"file":"/home/cloud/public_html/lib/private/SystemConfig.php","line":111,"function":"setValue","class":"OC\\\\Config","type":"->"},{"file":"/home/cloud/public_html/lib/private/legacy/OC_Util.php","line":1167,"function":"setValue","class":"OC\\\\SystemConfig","type":"->"},{"file":"/home/cloud/public_html/lib/base.php","line":421,"function":"getInstanceId","class":"OC_Util","type":"::"},{"file":"/home/cloud/public_html/lib/base.php","line":650,"function":"initSession","class":"OC","type":"::"},{"file":"/home/cloud/public_html/lib/base.php","line":1092,"function":"init","class":"OC","type":"::"},{"file":"/home/cloud/public_html/index.php","line":35,"args":["/home/cloud/public_html/lib/base.php"],"function":"require_once"}],"File":"/home/cloud/public_html/lib/private/Config.php","Line":250,"Hint":"This can usually be fixed by giving the webserver write access to the config directory.","CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36","version":""}
[Mon Oct 05 07:11:55.220294 2020] [fcgid:warn] [pid 1824837] [client 192.168.1.6:60048] mod_fcgid: stderr: {"reqId":"o46SN4CbH8fQz7GIL9a4","level":3,"time":"2020-10-05T12:11:55+00:00","remoteAddr":"192.168.1.6","user":"--","app":"index","method":"GET","url":"/","message":{"Exception":"Doctrine\\\\DBAL\\\\DBALException","Message":"Failed to connect to the database: An exception occurred in driver: could not find driver","Code":0,"Trace":[{"file":"/home/cloud/public_html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php","line":1449,"function":"connect","class":"OC\\\\DB\\\\Connection","type":"->"},{"file":"/home/cloud/public_html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php","line":892,"function":"getWrappedConnection","class":"Doctrine\\\\DBAL\\\\Connection","type":"->"},{"file":"/home/cloud/public_html/lib/private/DB/Connection.php","line":194,"function":"executeQuery","class":"Doctrine\\\\DBAL\\\\Connection","type":"->"},{"file":"/home/cloud/public_html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php","line":206,"function":"executeQuery","class":"OC\\\\DB\\\\Connection","type":"->"},{"file":"/home/cloud/public_html/lib/private/DB/QueryBuilder/QueryBuilder.php","line":217,"function":"execute","class":"Doctrine\\\\DBAL\\\\Query\\\\QueryBuilder","type":"->"},{"file":"/home/cloud/public_html/lib/private/AppConfig.php","line":332,"function":"execute","class":"OC\\\\DB\\\\QueryBuilder\\\\QueryBuilder","type":"->"},{"file":"/home/cloud/public_html/lib/private/AppConfig.php","line":110,"function":"loadConfigValues","class":"OC\\\\AppConfig","type":"->"},{"file":"/home/cloud/public_html/lib/private/AppConfig.php","line":288,"function":"getApps","class":"OC\\\\AppConfig","type":"->"},{"file":"/home/cloud/public_html/lib/private/App/AppManager.php","line":136,"function":"getValues","class":"OC\\\\AppConfig","type":"->"},{"file":"/home/cloud/public_html/lib/private/App/AppManager.php","line":225,"functi
[Mon Oct 05 07:11:55.222684 2020] [fcgid:warn] [pid 1824837] [client 192.168.1.6:60048] mod_fcgid: stderr: ass":"OC\\\\App\\\\AppManager","type":"->"},{"file":"/home/cloud/public_html/index.php","line":45,"function":"printErrorPage","class":"OC_Template","type":"::"}],"File":"/home/cloud/public_html/lib/private/DB/Connection.php","Line":67,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36","version":""}
[Mon Oct 05 07:11:55.222713 2020] [fcgid:warn] [pid 1824837] [client 192.168.1.6:60048] mod_fcgid: stderr: {"reqId":"o46SN4CbH8fQz7GIL9a4","level":3,"time":"2020-10-05T12:11:55+00:00","remoteAddr":"192.168.1.6","user":"--","app":"PHP","method":"GET","url":"/","message":"fopen(/home/cloud/public_html/data/nextcloud.log): failed to open stream: No such file or directory at /home/cloud/public_html/lib/private/Log/File.php#85","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36","version":""}

If you need more Logs I will get them to you

Fixed! it was data directory permissions.

Can you explain the fix? THX!