OCC not working

Nextcloud version (eg, 18.0.2): 20.0.0.6
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:

An unhandled exception has been thrown:
OCP\Files\NotPermittedException: Could not create folder in /home/cloud/public_html/lib/private/Files/Node/Folder.php:167
Stack trace:
#0 [internal function]: OC\Files\Node\Folder->newFolder()
#1 /home/cloud/public_html/lib/private/Files/Node/LazyFolder.php(66): call_user_func_array()
#2 /home/cloud/public_html/lib/private/Files/Node/LazyFolder.php(392): OC\Files\Node\LazyFolder->__call()
#3 /home/cloud/public_html/apps/news/lib/AppInfo/Application.php(112): OC\Files\Node\LazyFolder->newFolder()
#4 /home/cloud/public_html/lib/private/AppFramework/Utility/SimpleContainer.php(155): OCA\News\AppInfo\Application->OCA\News\AppInfo\{closure}()
#5 /home/cloud/public_html/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#6 /home/cloud/public_html/lib/private/AppFramework/Utility/SimpleContainer.php(122): Pimple\Container->offsetGet()
#7 /home/cloud/public_html/lib/private/AppFramework/DependencyInjection/DIContainer.php(449): OC\AppFramework\Utility\SimpleContainer->query()
#8 /home/cloud/public_html/lib/private/AppFramework/DependencyInjection/DIContainer.php(427): OC\AppFramework\DependencyInjection\DIContainer->queryNoFallback()
#9 /home/cloud/public_html/apps/news/lib/AppInfo/Application.php(128): OC\AppFramework\DependencyInjection\DIContainer->query()
#10 /home/cloud/public_html/lib/private/AppFramework/Utility/SimpleContainer.php(155): OCA\News\AppInfo\Application->OCA\News\AppInfo\{closure}()
#11 /home/cloud/public_html/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#12 /home/cloud/public_html/lib/private/AppFramework/Utility/SimpleContainer.php(122): Pimple\Container->offsetGet()
#13 /home/cloud/public_html/lib/private/AppFramework/DependencyInjection/DIContainer.php(449): OC\AppFramework\Utility\SimpleContainer->query()
#14 /home/cloud/public_html/lib/private/AppFramework/DependencyInjection/DIContainer.php(427): OC\AppFramework\DependencyInjection\DIContainer->queryNoFallback()
#15 /home/cloud/public_html/apps/news/lib/AppInfo/Application.php(178): OC\AppFramework\DependencyInjection\DIContainer->query()
#16 /home/cloud/public_html/lib/private/AppFramework/Utility/SimpleContainer.php(155): OCA\News\AppInfo\Application->OCA\News\AppInfo\{closure}()
#17 /home/cloud/public_html/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#18 /home/cloud/public_html/lib/private/AppFramework/Utility/SimpleContainer.php(122): Pimple\Container->offsetGet()
#19 /home/cloud/public_html/lib/private/AppFramework/DependencyInjection/DIContainer.php(449): OC\AppFramework\Utility\SimpleContainer->query()
#20 /home/cloud/public_html/lib/private/AppFramework/DependencyInjection/DIContainer.php(427): OC\AppFramework\DependencyInjection\DIContainer->queryNoFallback()
#21 /home/cloud/public_html/apps/news/lib/AppInfo/Application.php(185): OC\AppFramework\DependencyInjection\DIContainer->query()
#22 /home/cloud/public_html/lib/private/AppFramework/Utility/SimpleContainer.php(155): OCA\News\AppInfo\Application->OCA\News\AppInfo\{closure}()
#23 /home/cloud/public_html/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#24 /home/cloud/public_html/lib/private/AppFramework/Utility/SimpleContainer.php(122): Pimple\Container->offsetGet()
#25 /home/cloud/public_html/lib/private/AppFramework/DependencyInjection/DIContainer.php(449): OC\AppFramework\Utility\SimpleContainer->query()
#26 /home/cloud/public_html/lib/private/AppFramework/DependencyInjection/DIContainer.php(427): OC\AppFramework\DependencyInjection\DIContainer->queryNoFallback()
#27 /home/cloud/public_html/lib/private/AppFramework/Utility/SimpleContainer.php(87): OC\AppFramework\DependencyInjection\DIContainer->query()
#28 [internal function]: OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#29 /home/cloud/public_html/lib/private/AppFramework/Utility/SimpleContainer.php(101): array_map()
#30 /home/cloud/public_html/lib/private/AppFramework/Utility/SimpleContainer.php(109): OC\AppFramework\Utility\SimpleContainer->buildClass()
#31 /home/cloud/public_html/lib/private/AppFramework/Utility/SimpleContainer.php(126): OC\AppFramework\Utility\SimpleContainer->resolve()
#32 /home/cloud/public_html/lib/private/AppFramework/DependencyInjection/DIContainer.php(455): OC\AppFramework\Utility\SimpleContainer->query()
#33 /home/cloud/public_html/lib/private/ServerContainer.php(140): OC\AppFramework\DependencyInjection\DIContainer->queryNoFallback()
#34 /home/cloud/public_html/lib/private/Console/Application.php(221): OC\ServerContainer->query()
#35 /home/cloud/public_html/lib/private/Console/Application.php(136): OC\Console\Application->loadCommandsFromInfoXml()
#36 /home/cloud/public_html/console.php(99): OC\Console\Application->loadCommands()
#37 /home/cloud/public_html/occ(11): require_once('/home/cloud/pub...')
#38 {main}

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

Steps to replicate it:

  1. ‘sudo -u www-data php occ’
    The output of your Nextcloud log in Admin > Logging:
{"reqId":"m2sBZW0mUDewSMMhvNPQ","level":4,"time":"2020-09-14T19:25:08+00:00","remoteAddr":"2604:99c0:8:2f96:c560:8a69:edaf:f264","user":"nsturtz","app":"webdav","method":"DELETE","url":"/remote.php/dav/files/nsturtz/Nextcloud.png","message":{"Exception":"Doctrine\\DBAL\\Exception\\DeadlockException","Message":"An exception occurred while executing 'UPDATE `oc_filecache` SET `size` = ? WHERE (`fileid` = ?) AND ((`size` <> ?) OR (`size` IS NULL))' with params [13255219, 291, 13255219]:\n\nSQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction","Code":0,"Trace":[{"file":"/home/cloud/public_html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php","line":169,"function":"convertException","class":"Doctrine\\DBAL\\Driver\\AbstractMySQLDriver","type":"->"},{"file":"/home/cloud/public_html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php","line":149,"function":"wrapException","class":"Doctrine\\DBAL\\DBALException","type":"::"},{"file":"/home/cloud/public_html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php","line":1071,"function":"driverExceptionDuringQuery","class":"Doctrine\\DBAL\\DBALException","type":"::"},{"file":"/home/cloud/public_html/lib/private/DB/Connection.php","line":214,"function":"executeUpdate","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/home/cloud/public_html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/>
{"reqId":"lKiGtD8bwXA43zS8oTcN","level":4,"time":"2020-09-14T19:25:08+00:00","remoteAddr":"2604:99c0:8:2f96:c560:8a69:edaf:f264","user":"nsturtz","app":"webdav","method":"DELETE","url":"/remote.php/dav/files/nsturtz/Photos","message":{"Exception":"Doctrine\\DBAL\\Exception\\DeadlockException","Message":"An exception occurred while executing 'UPDATE `oc_filecache` SET `mtime` = GREATEST(`mtime`, ?), `etag` = ? WHERE (`storage` = ?) AND (`path_hash` IN ('d41d8cd98f00b204e9800998ecf8427e', '45b963397aa40d4a0063e0d85e4fe7a1'))' with params [1600111508, \"5f5fc39493f4a\", 5]:\n\nSQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction","Code":0,"Trace":[{"file":"/home/cloud/public_html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php","line":169,"function":"convertException","class":"Doctrine\\DBAL\\Driver\\AbstractMySQLDriver","type":"->"},{"file":"/home/cloud/public_html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php","line":149,"function":"wrapException","class":"Doctrine\\DBAL\\DBALException","type":"::"},{"file":"/home/cloud/public_html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php","line":1071,"function":"driverExceptionDuringQuery","class":"Doctrine\\DBAL\\DBALException","type":"::"},{"file":"/home/cloud/public_html/lib/private/DB/Connection.php","line":214,"function":"executeUpdate","class":"Doctrine\\DBAL\\Connection>
{"reqId":"s2L0097K27o5vCpifrwJ","level":3,"time":"2020-09-14T19:25:40+00:00","remoteAddr":"2604:99c0:8:2f96:223:24ff:fe08:581f","user":"admin","app":"PHP","method":"POST","url":"/index.php/settings/apps/enable","message":"Allowed memory size of 134217728 bytes exhausted (tried to allocate 345749672 bytes) at /home/cloud/public_html/lib/private/Installer.php#287","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0","version":"20.0.0.6"}
{"reqId":"iPEvdVQe9zVp7wNP42Ol","level":3,"time":"2020-09-14T19:26:27+00:00","remoteAddr":"2604:99c0:8:2f96:223:24ff:fe08:581f","user":"admin","app":"settings","method":"POST","url":"/index.php/settings/apps/enable","message":{"Exception":"InvalidArgumentException","Message":"Column name \"oc_talk_participants\".\"session_id\" is NotNull, but has empty string or null as default.","Code":0,"Trace":[{"file":"/home/cloud/public_html/lib/private/DB/MigrationService.php","line":484,"function":"ensureOracleIdentifierLengthLimit","class":"OC\\DB\\MigrationService","type":"->"},{"file":"/home/cloud/public_html/lib/private/DB/MigrationService.php","line":414,"function":"executeStep","class":"OC\\DB\\MigrationService","type":"->"},{"file":"/home/cloud/public_html/lib/private/Installer.php","line":157,"function":"migrate","class":"OC\\DB\\MigrationService","type":"->"},{"file":"/home/cloud/public_html/apps/settings/lib/Controller/AppSettingsController.php","line":448,"function":"installApp","class":"OC\\Installer","type":"->"},{"file":"/home/cloud/public_html/lib/private/AppFramework/Http/Dispatcher.php","line":169,"function":"enableApps","class":"OCA\\Settings\\Controller\\AppSettingsController","type":"->"},{"file":"/home/cloud/public_html/lib/private/AppFramework/Http/Dispatcher.php","line":100,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/home/cloud/public_html>

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

<?php
$CONFIG = array (
  'instanceid' => '***',
  'passwordsalt' => '***',
  'secret' => '***',
  'trusted_domains' => 
  array (
    0 => 'cloud.sturtz.ml',
  ),
  'datadirectory' => '/data',
  'dbtype' => 'mysql',
  'version' => '20.0.0.6',
  'overwrite.cli.url' => 'http://cloud.sturtz.ml',
  'dbname' => 'cloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => '***',
  'dbpassword' => '****',
  'installed' => true,
  'app_install_overwrite' => 
  array (
    0 => 'contacts',
  )
);






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

[Mon Sep 14 00:00:08.272068 2020] [mpm_prefork:notice] [pid 2010] AH00163: Apache/2.4.41 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.1.1f configured -- resuming normal operations
[Mon Sep 14 00:00:08.272098 2020] [core:notice] [pid 2010] AH00094: Command line: '/usr/sbin/apache2'
[Mon Sep 14 10:31:03.321682 2020] [mpm_prefork:notice] [pid 2010] AH00171: Graceful restart requested, doing restart
[Mon Sep 14 10:31:05.070175 2020] [core:error] [pid 2010] (EAI 2)Name or service not known: AH00547: Could not resolve host name *: -- ignoring!
[Mon Sep 14 10:31:05.070359 2020] [core:error] [pid 2010] (EAI 2)Name or service not known: AH00547: Could not resolve host name *: -- ignoring!
[Mon Sep 14 10:31:05.070527 2020] [core:error] [pid 2010] (EAI 2)Name or service not known: AH00547: Could not resolve host name *: -- ignoring!
[Mon Sep 14 10:31:05.325128 2020] [mpm_prefork:notice] [pid 2010] AH00163: Apache/2.4.41 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.1.1f configured -- resuming normal operations
[Mon Sep 14 10:31:05.325148 2020] [core:notice] [pid 2010] AH00094: Command line: '/usr/sbin/apache2'
[Mon Sep 14 10:32:30.688002 2020] [mpm_prefork:notice] [pid 2010] AH00171: Graceful restart requested, doing restart
[Mon Sep 14 10:32:30.778879 2020] [core:error] [pid 2010] (EAI 2)Name or service not known: AH00547: Could not resolve host name *: -- ignoring!
[Mon Sep 14 10:32:30.779048 2020] [core:error] [pid 2010] (EAI 2)Name or service not known: AH00547: Could not resolve host name *: -- ignoring!
[Mon Sep 14 10:32:30.779213 2020] [core:error] [pid 2010] (EAI 2)Name or service not known: AH00547: Could not resolve host name *: -- ignoring!
[Mon Sep 14 10:32:30.809491 2020] [mpm_prefork:notice] [pid 2010] AH00163: Apache/2.4.41 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.1.1f configured -- resuming normal operations
[Mon Sep 14 10:32:30.809508 2020] [core:notice] [pid 2010] AH00094: Command line: '/usr/sbin/apache2'
[Mon Sep 14 10:50:08.581929 2020] [mpm_prefork:notice] [pid 2010] AH00171: Graceful restart requested, doing restart
[Mon Sep 14 10:50:09.775474 2020] [core:error] [pid 2010] (EAI 2)Name or service not known: AH00547: Could not resolve host name *: -- ignoring!
[Mon Sep 14 10:50:09.775724 2020] [core:error] [pid 2010] (EAI 2)Name or service not known: AH00547: Could not resolve host name *: -- ignoring!
[Mon Sep 14 10:50:09.775966 2020] [core:error] [pid 2010] (EAI 2)Name or service not known: AH00547: Could not resolve host name *: -- ignoring!
[Mon Sep 14 10:50:09.804928 2020] [mpm_prefork:notice] [pid 2010] AH00163: Apache/2.4.41 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.1.1f configured -- resuming normal operations
[Mon Sep 14 10:50:09.804945 2020] [core:notice] [pid 2010] AH00094: Command line: '/usr/sbin/apache2'



What are the permissions of the parent folder?

Is the disk full or mounted read only?

www-data is the owner and the data disks and itis read and write for the data dir and the /home/cloud/public_html, @KarlF12 I just updated it