Nextcloud not working anymore. i'm stuck!

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, 18.0.2): 16? (I’M NOT SURE)
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.29
PHP version (eg, 7.1): 7.2.24

The issue you are facing:
Hi,
I’m new here, I hope the information provided below follow the forum’s rules.

When I try to fire up my nextcloud address on the web-browser I get this error: “Internal Server Error
The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.”

There have been no problem for years, I use nextcloud only as my personal cloud but it is now quite important for my work.
I tried to reinstall nextcloud manually with no luck; indeed, when I run the “occ upgrade” command I get a very long error ending with “{“reqId”:“uYhnWAUw7P8IfrBVUNJG”,“level”:3,“time”:“2020-08-30T12:39:08+00:00”,“remoteAddr”:”",“user”:"–",“app”:“PHP”,“method”:"",“url”:"–",“message”:“chmod(): Permission denied at /var/www/nextcloud/lib/private/Log\File.php#141”,“userAgent”:"–",“version”:“16.0.10.2”}

Many thanks for your help!
Angelo

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

Steps to replicate it:

1.I can’t run any occ command
2. I can’t load my nextcloud’s homepage
3.

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 => 'asds.dynu.net',
  ),
  'datadirectory' => '/home/asds/nextcloud',
  'dbtype' => 'mysql',
  'version' => '16.0.10.2',
  'overwrite.cli.url' => 'https://***/nextcloud',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'asds',
  'dbpassword' => '***',
  'installed' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
);

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

[Sun Aug 30 14:14:45.055869 2020] [php7:warn] [pid 31317] [client 127.0.0.1:57006] PHP Warning:  fileperms(): stat failed for /home/asds/nextcloud/nextcloud.log in /var/www/nextcloud/lib/private/Log/File.php on line 140
[Sun Aug 30 14:14:45.055936 2020] [php7:notice] [pid 31317] [client 127.0.0.1:57006] {"reqId":"yPzX96YeVoTZhnCDDSZN","level":3,"time":"2020-08-30T12:14:45+00:00","remoteAddr":"127.0.0.1","user":"--","app":"PHP","method":"GET","url":"\\/nextcloud\\/","message":"fileperms(): stat failed for \\/home\\/asds\\/nextcloud\\/nextcloud.log at \\/var\\/www\\/nextcloud\\/lib\\/private\\/Log\\/File.php#140","userAgent":"Mozilla\\/5.0 (X11; Ubuntu; Linux x86_64; rv:80.0) Gecko\\/20100101 Firefox\\/80.0","version":"16.0.10.2"}
[Sun Aug 30 14:14:45.055979 2020] [php7:notice] [pid 31317] [client 127.0.0.1:57006] {"reqId":"yPzX96YeVoTZhnCDDSZN","level":3,"time":"2020-08-30T12:14:45+00:00","remoteAddr":"127.0.0.1","user":"--","app":"no app in context","method":"GET","url":"\\/nextcloud\\/","message":"$absolutePath must be relative to \\"files\\", value is \\"%s\\"","userAgent":"Mozilla\\/5.0 (X11; Ubuntu; Linux x86_64; rv:80.0) Gecko\\/20100101 Firefox\\/80.0","version":"16.0.10.2"}
[Sun Aug 30 14:14:45.057166 2020] [php7:warn] [pid 31317] [client 127.0.0.1:57006] PHP Warning:  fileperms(): stat failed for /home/asds/nextcloud/nextcloud.log in /var/www/nextcloud/lib/private/Log/File.php on line 140
[Sun Aug 30 14:14:45.057190 2020] [php7:notice] [pid 31317] [client 127.0.0.1:57006] {"reqId":"yPzX96YeVoTZhnCDDSZN","level":3,"time":"2020-08-30T12:14:45+00:00","remoteAddr":"127.0.0.1","user":"--","app":"PHP","method":"GET","url":"\\/nextcloud\\/","message":"fileperms(): stat failed for \\/home\\/asds\\/nextcloud\\/nextcloud.log at \\/var\\/www\\/nextcloud\\/lib\\/private\\/Log\\/File.php#140","userAgent":"Mozilla\\/5.0 (X11; Ubuntu; Linux x86_64; rv:80.0) Gecko\\/20100101 Firefox\\/80.0","version":"16.0.10.2"}
[Sun Aug 30 14:14:45.057216 2020] [php7:notice] [pid 31317] [client 127.0.0.1:57006] {"reqId":"yPzX96YeVoTZhnCDDSZN","level":3,"time":"2020-08-30T12:14:45+00:00","remoteAddr":"127.0.0.1","user":"--","app":"no app in context","method":"GET","url":"\\/nextcloud\\/","message":{"Exception":"OCP\\\\Lock\\\\LockedException","Message":"\\"\\/files_encryption\\" is locked","Code":0,"Trace":[{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/Files\\/View.php","line":1149,"function":"changeLock","class":"OC\\\\Files\\\\View","type":"->","args":["\\/files_encryption",2]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/Files\\/View.php","line":270,"function":"basicOperation","class":"OC\\\\Files\\\\View","type":"->","args":["mkdir","\\/files_encryption",["create","write"]]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/Encryption\\/Keys\\/Storage.php","line":372,"function":"mkdir","class":"OC\\\\Files\\\\View","type":"->","args":["\\/files_encryption"]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/Encryption\\/Keys\\/Storage.php","line":232,"function":"keySetPreparation","class":"OC\\\\Encryption\\\\Keys\\\\Storage","type":"->","args":["\\/files_encryption\\/OC_DEFAULT_MODULE"]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/Encryption\\/Keys\\/Storage.php","line":133,"function":"setKey","class":"OC\\\\Encryption\\\\Keys\\\\Storage","type":"->","args":["\\/files_encryption\\/OC_DEFAULT_MODULE\\/pubShare_c5c3e263.publicKey","-----BEGIN PUBLIC KEY-----\\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAvleEgdxAVhFFq3Lpg7Hw\\ny6+tzWzmkRVIt3JHcVCZhNeOHRFHZ2JYEYrl0Zw\\/7Rosx0fKlBEXwAebeaUa+chr\\nsL03yqd+GnIWvUHbis83lW57AKqT+588NDIAng\\/fFYP8kpwCkSoR\\/XEcQ5ECu4Cz\\ntiXFDyJofuupgkfvm1eY2kgsz+S5yUkLDKrwf\\/4JKh0s8WUF6D8gWNp5iOrAxLxo\\nP5YQqWfo3y1L6Q8KQei2aXgK7F1KJA5+DfncdqUSYS0uldDlO7Bj+xm+IBQmkrJh\\nR+xzoudyHbj2GNWQUmProFwRGyya7RnLOs5N1\\/M2lqSTiY5SHXKs6JiFspTmVeFn\\noEA4TUvTNEFJ1kmC+6olhgRm3GS3Hl9dRl57scr03H+Xmgnc+ZTsQlCPH6F64zV\\/\\nTj0xbfRxgbNG7Ila5cgfTclVEPzh\\/eWOkP3R995GgQUZk5kEH61LWp+0XAFbBbFk\\nbo1B9HbYe13lS2Ko9N3SAy3fZ+odhqOzST\\/yLCbte67SRWzAqLkmM0ztfxAzX0J+\\nLtvJPgWe4AllFgYKCrBdOFL+wAIG3jv6xVjWjyrWzINX9ZH\\/skBgi7enfqfB487v\\nUL4AQczq2ln2aL33vCDdHTUMA\\/E9ajFcdA5aBXP225UDHvll1bY3MWHdGzF29jTR\\nIsYjEA9hAiEyS21RPZWFyLkCAwEAAQ==\\n-----END PUBLIC KEY-----\\n"]},{"file":"\\/var\\/www\\/nextcloud\\/apps\\/encryption\\/lib\\/KeyManager.php","line":166,"function":"setSystemUserKey","class":"OC\\\\Encryption\\\\Keys\\\\Storage","type":"->","args":["pubShare_c5c3e263.publicKey","-----BEGIN PUBLIC KEY-----\\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAvleEgdxAVhFFq3Lpg7Hw\\ny6+tzWzmkRVIt3JHcVCZhNeOHRFHZ2JYEYrl0Zw\\/7Rosx0fKlBEXwAebeaUa+chr\\nsL03yqd+GnIWvUHbis83lW57AKqT+588NDIAng\\/fFYP8kpwCkSoR\\/XEcQ5ECu4Cz\\ntiXFDyJofuupgkfvm1eY2kgsz+S5yUkLDKrwf\\/4JKh0s8WUF6D8gWNp5iOrAxLxo\\nP5YQqWfo3y1L6Q8KQei2aXgK7F1KJA5+DfncdqUSYS0uldDlO7Bj+xm+IBQmkrJh\\nR+xzoudyHbj2GNWQUmProFwRGyya7RnLOs5N1\\/M2lqSTiY5SHXKs6JiFspTmVeFn\\noEA4TUvTNEFJ1kmC+6olhgRm3GS3Hl9dRl57scr03H+Xmgnc+ZTsQlCPH6F64zV\\/\\nTj0xbfRxgbNG7Ila5cgfTclVEPzh\\/eWOkP3R995GgQUZk5kEH61LWp+0XAFbBbFk\\nbo1B9HbYe13lS2Ko9N3SAy3fZ+odhqOzST\\/yLCbte67SRWzAqLkmM0ztfxAzX0J+\\nLtvJPgWe4AllFgYKCrBdOFL+wAIG3jv6xVjWjyrWzINX9ZH\\/skBgi7enfqfB487v\\nUL4AQczq2ln2aL33vCDdHTUMA\\/E9ajFcdA5aBXP225UDHvll1bY3MWHdGzF29jTR\\nIsYjEA9hAiEyS21RPZWFyLkCAwEAAQ==\\n-----END PUBLIC KEY-----\\n","OC_DEFAULT_MODULE"]},{"file":"\\/var\\/www\\/nextcloud\\/apps\\/encryption\\/lib\\/Users\\/Setup.php","line":86,"function":"validateShareKey","class":"OCA\\\\Encryption\\\\KeyManager","type":"->","args":[]},{"file":"\\/var\\/www\\/nextcloud\\/apps\\/encryption\\/lib\\/AppInfo\\/Application.php","line":70,"function":"setupSystem","class":"OCA\\\\Encryption\\\\Users\\\\Setup","type":"->","args":[]},{"file":"\\/var\\/www\\/nextcloud\\/apps\\/encryption\\/appinfo\\/app.php","line":35,"function":"setUp","class":"OCA\\\\Encryption\\\\AppInfo\\\\Application","type":"->","args":[]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/legacy\\/app.php","line":265,"args":["\\/var\\/www\\/nextcloud\\/apps\\/encryption\\/appinfo\\/app.php"],"function":"require_once"},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/legacy\\/app.php","line":155,"function":"requireAppFile","class":"OC_App","type":"::","args":[{"__class__":"OCA\\\\Encryption\\\\AppInfo\\\\Application"}]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/legacy\\/app.php","line":128,"function":"loadApp","class":"OC_App","type":"::","args":["encryption"]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/legacy\\/util.php","line":196,"function":"loadApps","class":"OC_App","type":"::","args":[["filesystem"]]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/Files\\/Filesystem.php","line":266,"function":"setupFS","class":"OC_Util","type":"::","args":[""]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/Server.php","line":291,"function":"getMountManager","class":"OC\\\\Files\\\\Filesystem","type":"::","args":[null]},{"file":"\\/var\\/www\\/nextcloud\\/3rdparty\\/pimple\\/pimple\\/src\\/Pimple\\/Container.php","line":118,"function":"OC\\\\{closure}","class":"OC\\\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/ServerContainer.php","line":125,"function":"offsetGet","class":"Pimple\\\\Container","type":"->","args":["RootFolder"]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/Server.php","line":313,"function":"query","class":"OC\\\\ServerContainer","type":"->","args":["RootFolder"]},{"function":"OC\\\\{closure}","class":"OC\\\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/Files\\/Node\\/LazyRoot.php","line":61,"function":"call_user_func","args":[{"__class__":"Closure"}]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/Files\\/Node\\/LazyRoot.php","line":141,"function":"__call","class":"OC\\\\Files\\\\Node\\\\LazyRoot","type":"->","args":["get",["appdata_oczk2tlfgepl\\/js\\/core"]]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/Files\\/AppData\\/AppData.php","line":140,"function":"get","class":"OC\\\\Files\\\\Node\\\\LazyRoot","type":"->","args":["appdata_oczk2tlfgepl\\/js\\/core"]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/Template\\/JSCombiner.php","line":94,"function":"getFolder","class":"OC\\\\Files\\\\AppData\\\\AppData","type":"->","args":["core"]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/Template\\/JSResourceLocator.php","line":114,"function":"process","class":"OC\\\\Template\\\\JSCombiner","type":"->","args":["\\/var\\/www\\/nextcloud","core\\/js\\/merged-template-prepend.json","core"]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/Template\\/JSResourceLocator.php","line":70,"function":"cacheAndAppendCombineJsonIfExist","class":"OC\\\\Template\\\\JSResourceLocator","type":"->","args":["\\/var\\/www\\/nextcloud","core\\/js\\/merged-template-prepend.json"]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/Template\\/ResourceLocator.php","line":78,"function":"doFind","class":"OC\\\\Template\\\\JSResourceLocator","type":"->","args":["js\\/merged-template-prepend"]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/TemplateLayout.php","line":331,"function":"find","class":"OC\\\\Template\\\\ResourceLocator","type":"->","args":[["core\\/js\\/dist\\/main","js\\/merged-template-prepend","search\\/js\\/search","core\\/l10n\\/en","search\\/l10n\\/en","search\\/js\\/searchprovider","js\\/files\\/fileinfo","js\\/files\\/client"]]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/TemplateLayout.php","line":159,"function":"findJavascriptFiles","class":"OC\\\\TemplateLayout","type":"::","args":[["core\\/js\\/dist\\/main","js\\/merged-template-prepend","search\\/js\\/search","core\\/l10n\\/en","search\\/l10n\\/en","search\\/js\\/searchprovider","js\\/files\\/fileinfo","js\\/files\\/client"]]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/legacy\\/template.php","line":183,"function":"__construct","class":"OC\\\\TemplateLayout","type":"->","args":["guest",""]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/Template\\/Base.php","line":131,"function":"fetchPage","class":"
[Sun Aug 30 14:14:45.085255 2020] [php7:warn] [pid 31317] [client 127.0.0.1:57006] PHP Warning:  fileperms(): stat failed for /home/asds/nextcloud/nextcloud.log in /var/www/nextcloud/lib/private/Log/File.php on line 140
[Sun Aug 30 14:14:45.085298 2020] [php7:notice] [pid 31317] [client 127.0.0.1:57006] {"reqId":"yPzX96YeVoTZhnCDDSZN","level":3,"time":"2020-08-30T12:14:45+00:00","remoteAddr":"127.0.0.1","user":"--","app":"PHP","method":"GET","url":"\\/nextcloud\\/","message":"fileperms(): stat failed for \\/home\\/asds\\/nextcloud\\/nextcloud.log at \\/var\\/www\\/nextcloud\\/lib\\/private\\/Log\\/File.php#140","userAgent":"Mozilla\\/5.0 (X11; Ubuntu; Linux x86_64; rv:80.0) Gecko\\/20100101 Firefox\\/80.0","version":"16.0.10.2"}
[Sun Aug 30 14:14:45.085325 2020] [php7:notice] [pid 31317] [client 127.0.0.1:57006] {"reqId":"yPzX96YeVoTZhnCDDSZN","level":3,"time":"2020-08-30T12:14:45+00:00","remoteAddr":"127.0.0.1","user":"--","app":"index","method":"GET","url":"\\/nextcloud\\/","message":{"Exception":"RuntimeException","Message":"Could not get appdata folder","Code":0,"Trace":[{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/Files\\/AppData\\/AppData.php","line":108,"function":"getAppDataRootFolder","class":"OC\\\\Files\\\\AppData\\\\AppData","type":"->","args":[]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/Files\\/AppData\\/AppData.php","line":155,"function":"getAppDataFolder","class":"OC\\\\Files\\\\AppData\\\\AppData","type":"->","args":[]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/Template\\/JSCombiner.php","line":97,"function":"newFolder","class":"OC\\\\Files\\\\AppData\\\\AppData","type":"->","args":["core"]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/Template\\/JSResourceLocator.php","line":114,"function":"process","class":"OC\\\\Template\\\\JSCombiner","type":"->","args":["\\/var\\/www\\/nextcloud","core\\/js\\/merged-template-prepend.json","core"]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/Template\\/JSResourceLocator.php","line":70,"function":"cacheAndAppendCombineJsonIfExist","class":"OC\\\\Template\\\\JSResourceLocator","type":"->","args":["\\/var\\/www\\/nextcloud","core\\/js\\/merged-template-prepend.json"]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/Template\\/ResourceLocator.php","line":78,"function":"doFind","class":"OC\\\\Template\\\\JSResourceLocator","type":"->","args":["js\\/merged-template-prepend"]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/TemplateLayout.php","line":331,"function":"find","class":"OC\\\\Template\\\\ResourceLocator","type":"->","args":[["core\\/js\\/dist\\/main","js\\/merged-template-prepend","search\\/js\\/search","core\\/l10n\\/en","search\\/l10n\\/en","search\\/js\\/searchprovider","js\\/files\\/fileinfo","js\\/files\\/client"]]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/TemplateLayout.php","line":159,"function":"findJavascriptFiles","class":"OC\\\\TemplateLayout","type":"::","args":[["core\\/js\\/dist\\/main","js\\/merged-template-prepend","search\\/js\\/search","core\\/l10n\\/en","search\\/l10n\\/en","search\\/js\\/searchprovider","js\\/files\\/fileinfo","js\\/files\\/client"]]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/legacy\\/template.php","line":183,"function":"__construct","class":"OC\\\\TemplateLayout","type":"->","args":["guest",""]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/Template\\/Base.php","line":131,"function":"fetchPage","class":"OC_Template","type":"->","args":[]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/legacy\\/template.php","line":273,"function":"printPage","class":"OC\\\\Template\\\\Base","type":"->","args":[]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/base.php","line":676,"function":"printGuestPage","class":"OC_Template","type":"::","args":["","error",{"errors":[{"error":"Your data directory is invalid","hint":"Ensure there is a file called \\".ocdata\\" in the root of the data directory."},{"error":"Cannot create \\"data\\" directory","hint":"This can usually be fixed by giving the webserver write access to the root directory. See https:\\/\\/docs.nextcloud.com\\/server\\/16\\/go.php?to=admin-dir_permissions"}]}]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/base.php","line":1053,"function":"init","class":"OC","type":"::","args":[]},{"file":"\\/var\\/www\\/nextcloud\\/index.php","line":40,"args":["\\/var\\/www\\/nextcloud\\/lib\\/base.php"],"function":"require_once"}],"File":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/Files\\/AppData\\/AppData.php","Line":92,"CustomMessage":"--"},"userAgent":"Mozilla\\/5.0 (X11; Ubuntu; Linux x86_64; rv:80.0) Gecko\\/20100101 Firefox\\/80.0","version":"16.0.10.2"}
[Sun Aug 30 14:14:45.087462 2020] [php7:warn] [pid 31317] [client 127.0.0.1:57006] PHP Warning:  fileperms(): stat failed for /home/asds/nextcloud/nextcloud.log in /var/www/nextcloud/lib/private/Log/File.php on line 140
[Sun Aug 30 14:14:45.087492 2020] [php7:notice] [pid 31317] [client 127.0.0.1:57006] {"reqId":"yPzX96YeVoTZhnCDDSZN","level":3,"time":"2020-08-30T12:14:45+00:00","remoteAddr":"127.0.0.1","user":"--","app":"PHP","method":"GET","url":"\\/nextcloud\\/","message":"fileperms(): stat failed for \\/home\\/asds\\/nextcloud\\/nextcloud.log at \\/var\\/www\\/nextcloud\\/lib\\/private\\/Log\\/File.php#140","userAgent":"Mozilla\\/5.0 (X11; Ubuntu; Linux x86_64; rv:80.0) Gecko\\/20100101 Firefox\\/80.0","version":"16.0.10.2"}
[Sun Aug 30 14:14:45.087518 2020] [php7:notice] [pid 31317] [client 127.0.0.1:57006] {"reqId":"yPzX96YeVoTZhnCDDSZN","level":3,"time":"2020-08-30T12:14:45+00:00","remoteAddr":"127.0.0.1","user":"--","app":"core","method":"GET","url":"\\/nextcloud\\/","message":{"Exception":"RuntimeException","Message":"Could not get appdata folder","Code":0,"Trace":[{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/Files\\/AppData\\/AppData.php","line":108,"function":"getAppDataRootFolder","class":"OC\\\\Files\\\\AppData\\\\AppData","type":"->","args":[]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/Files\\/AppData\\/AppData.php","line":155,"function":"getAppDataFolder","class":"OC\\\\Files\\\\AppData\\\\AppData","type":"->","args":[]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/Template\\/JSCombiner.php","line":97,"function":"newFolder","class":"OC\\\\Files\\\\AppData\\\\AppData","type":"->","args":["core"]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/Template\\/JSResourceLocator.php","line":114,"function":"process","class":"OC\\\\Template\\\\JSCombiner","type":"->","args":["\\/var\\/www\\/nextcloud","core\\/js\\/merged-template-prepend.json","core"]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/Template\\/JSResourceLocator.php","line":70,"function":"cacheAndAppendCombineJsonIfExist","class":"OC\\\\Template\\\\JSResourceLocator","type":"->","args":["\\/var\\/www\\/nextcloud","core\\/js\\/merged-template-prepend.json"]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/Template\\/ResourceLocator.php","line":78,"function":"doFind","class":"OC\\\\Template\\\\JSResourceLocator","type":"->","args":["js\\/merged-template-prepend"]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/TemplateLayout.php","line":331,"function":"find","class":"OC\\\\Template\\\\ResourceLocator","type":"->","args":[["core\\/js\\/dist\\/main","js\\/merged-template-prepend","search\\/js\\/search","core\\/l10n\\/en","search\\/l10n\\/en","search\\/js\\/searchprovider","js\\/files\\/fileinfo","js\\/files\\/client"]]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/TemplateLayout.php","line":159,"function":"findJavascriptFiles","class":"OC\\\\TemplateLayout","type":"::","args":[["core\\/js\\/dist\\/main","js\\/merged-template-prepend","search\\/js\\/search","core\\/l10n\\/en","search\\/l10n\\/en","search\\/js\\/searchprovider","js\\/files\\/fileinfo","js\\/files\\/client"]]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/legacy\\/template.php","line":183,"function":"__construct","class":"OC\\\\TemplateLayout","type":"->","args":["guest",""]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/Template\\/Base.php","line":131,"function":"fetchPage","class":"OC_Template","type":"->","args":[]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/legacy\\/template.php","line":273,"function":"printPage","class":"OC\\\\Template\\\\Base","type":"->","args":[]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/base.php","line":676,"function":"printGuestPage","class":"OC_Template","type":"::","args":["","error",{"errors":[{"error":"Your data directory is invalid","hint":"Ensure there is a file called \\".ocdata\\" in the root of the data directory."},{"error":"Cannot create \\"data\\" directory","hint":"This can usually be fixed by giving the webserver write access to the root directory. See https:\\/\\/docs.nextcloud.com\\/server\\/16\\/go.php?to=admin-dir_permissions"}]}]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/base.php","line":1053,"function":"init","class":"OC","type":"::","args":[]},{"file":"\\/var\\/www\\/nextcloud\\/index.php","line":40,"args":["\\/var\\/www\\/nextcloud\\/lib\\/base.php"],"function":"require_once"}],"File":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/Files\\/AppData\\/AppData.php","Line":92,"CustomMessage":"--"},"userAgent":"Mozilla\\/5.0 (X11; Ubuntu; Linux x86_64; rv:80.0) Gecko\\/20100101 Firefox\\/80.0","version":"16.0.10.2"}
[Sun Aug 30 14:14:45.087832 2020] [php7:warn] [pid 31317] [client 127.0.0.1:57006] PHP Warning:  fileperms(): stat failed for /home/asds/nextcloud/nextcloud.log in /var/www/nextcloud/lib/private/Log/File.php on line 140
[Sun Aug 30 14:14:45.087850 2020] [php7:notice] [pid 31317] [client 127.0.0.1:57006] {"reqId":"yPzX96YeVoTZhnCDDSZN","level":3,"time":"2020-08-30T12:14:45+00:00","remoteAddr":"127.0.0.1","user":"--","app":"PHP","method":"GET","url":"\\/nextcloud\\/","message":"fileperms(): stat failed for \\/home\\/asds\\/nextcloud\\/nextcloud.log at \\/var\\/www\\/nextcloud\\/lib\\/private\\/Log\\/File.php#140","userAgent":"Mozilla\\/5.0 (X11; Ubuntu; Linux x86_64; rv:80.0) Gecko\\/20100101 Firefox\\/80.0","version":"16.0.10.2"}
[Sun Aug 30 14:14:45.087874 2020] [php7:notice] [pid 31317] [client 127.0.0.1:57006] {"reqId":"yPzX96YeVoTZhnCDDSZN","level":3,"time":"2020-08-30T12:14:45+00:00","remoteAddr":"127.0.0.1","user":"--","app":"core","method":"GET","url":"\\/nextcloud\\/","message":{"Exception":"RuntimeException","Message":"Could not get appdata folder","Code":0,"Trace":[{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/Files\\/AppData\\/AppData.php","line":108,"function":"getAppDataRootFolder","class":"OC\\\\Files\\\\AppData\\\\AppData","type":"->","args":[]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/Files\\/AppData\\/AppData.php","line":155,"function":"getAppDataFolder","class":"OC\\\\Files\\\\AppData\\\\AppData","type":"->","args":[]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/Template\\/JSCombiner.php","line":97,"function":"newFolder","class":"OC\\\\Files\\\\AppData\\\\AppData","type":"->","args":["core"]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/Template\\/JSResourceLocator.php","line":114,"function":"process","class":"OC\\\\Template\\\\JSCombiner","type":"->","args":["\\/var\\/www\\/nextcloud","core\\/js\\/merged-template-prepend.json","core"]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/Template\\/JSResourceLocator.php","line":70,"function":"cacheAndAppendCombineJsonIfExist","class":"OC\\\\Template\\\\JSResourceLocator","type":"->","args":["\\/var\\/www\\/nextcloud","core\\/js\\/merged-template-prepend.json"]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/Template\\/ResourceLocator.php","line":78,"function":"doFind","class":"OC\\\\Template\\\\JSResourceLocator","type":"->","args":["js\\/merged-template-prepend"]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/TemplateLayout.php","line":331,"function":"find","class":"OC\\\\Template\\\\ResourceLocator","type":"->","args":[["core\\/js\\/dist\\/main","js\\/merged-template-prepend","search\\/js\\/search","core\\/l10n\\/en","search\\/l10n\\/en","search\\/js\\/searchprovider","js\\/files\\/fileinfo","js\\/files\\/client","encryption\\/l10n\\/en","encryption\\/js\\/encryption","core\\/js\\/dist\\/share_backend"]]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/TemplateLayout.php","line":159,"function":"findJavascriptFiles","class":"OC\\\\TemplateLayout","type":"::","args":[["core\\/js\\/dist\\/main","js\\/merged-template-prepend","search\\/js\\/search","core\\/l10n\\/en","search\\/l10n\\/en","search\\/js\\/searchprovider","js\\/files\\/fileinfo","js\\/files\\/client","encryption\\/l10n\\/en","encryption\\/js\\/encryption","core\\/js\\/dist\\/share_backend"]]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/legacy\\/template.php","line":183,"function":"__construct","class":"OC\\\\TemplateLayout","type":"->","args":["error",""]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/Template\\/Base.php","line":131,"function":"fetchPage","class":"OC_Template","type":"->","args":[]},{"file":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/legacy\\/template.php","line":332,"function":"printPage","class":"OC\\\\Template\\\\Base","type":"->","args":[]},{"file":"\\/var\\/www\\/nextcloud\\/index.php","line":69,"function":"printExceptionErrorPage","class":"OC_Template","type":"::","args":[{"__class__":"RuntimeException"},500]}],"File":"\\/var\\/www\\/nextcloud\\/lib\\/private\\/Files\\/AppData\\/AppData.php","Line":92,"CustomMessage":"--"},"userAgent":"Mozilla\\/5.0 (X11; Ubuntu; Linux x86_64; rv:80.0) Gecko\\/20100101 Firefox\\/80.0","version":"16.0.10.2"}
[Sun Aug 30 14:14:45.088131 2020] [php7:warn] [pid 31317] [client 127.0.0.1:57006] PHP Warning:  fileperms(): stat failed for /home/asds/nextcloud/nextcloud.log in /var/www/nextcloud/lib/private/Log/File.php on line 140
[Sun Aug 30 14:14:45.088149 2020] [php7:notice] [pid 31317] [client 127.0.0.1:57006] {"reqId":"yPzX96YeVoTZhnCDDSZN","level":3,"time":"2020-08-30T12:14:45+00:00","remoteAddr":"127.0.0.1","user":"--","app":"PHP","method":"GET","url":"\\/nextcloud\\/","message":"fileperms(): stat failed for \\/home\\/asds\\/nextcloud\\/nextcloud.log at \\/var\\/www\\/nextcloud\\/lib\\/private\\/Log\\/File.php#140","userAgent":"Mozilla\\/5.0 (X11; Ubuntu; Linux x86_64; rv:80.0) Gecko\\/20100101 Firefox\\/80.0","version":"16.0.10.2"}
[Sun Aug 30 14:14:45.088173 2020] [php7:notice] [pid 31317] [client 127.0.0.1:57006] {"reqId":"yPzX96YeVoTZhnCDDSZN","level":3,"time":"2020-08-30T12:14:45+00:00","remoteAddr":"127.0.0.1","user":"--","app":"PHP","method":"GET","url":"\\/nextcloud\\/","message":"chmod(): Permission denied at \\/var\\/www\\/nextcloud\\/lib\\/private\\/Log\\/File.php#141","userAgent":"Mozilla\\/5.0 (X11; Ubuntu; Linux x86_64; rv:80.0) Gecko\\/20100101 Firefox\\/80.0","version":"16.0.10.2"}

Quite often this error means it can’t connect to the database. Confirm your database is running and the disk isn’t full.

Yes that is true. If Nextcloud can access the database the error messages usually look different.

Thanks.
mysql is active/running - or you meant something else for “database”? Sorry I’m not a website admin or anything like that
Disk definitely not full.

No i meant mysql

Thanks, that’s working ok then. Any other idea?

Your logs are complaining about file permissions in the data folder. Have you changed anything before this quit working?

No, I didn’t, always the same folder owned by the default apache user (www-data).

Had exactly the same problem and error. 2hrs later…backup and running.

hope you get yours sorted.

Abridged the log output provided by @angelodl78 in order to enhance the clarity of the file permissions errors elucidated by @KarlF12 (quoted above):