Moved to new server - can't access any files via web or sync

Support intro
example

Or for longer, use three backticks above and below the code snippet:

Nextcloud version 13.0.2:
Operating system and version (Ubuntu 18.04):
Apache or nginx version (Apache/2.4.29):
PHP version (PHP 7.2.3-1ubuntu1):

The issue you are facing:
Can’t open / read any file from web GUI – sync client not uploading / downloading files

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

Steps to replicate it:

  1. NC web GUI - click on any file, get error that file can’t be read

The output of your Nextcloud log in Admin > Logging:

|Error|PHP|fopen(/opt/nextcloud/SuperAdmin/files/_TK Docs/Customer Information/_TK - TechKnowligence/Colo notes.txt): failed to open stream: No such file or directory at /var/www/html/nextcloud/lib/private/Files/Storage/Local.php#282|2018-05-04T10:43:01-0500|
|---|---|---|---|
|Error|PHP|file_get_contents(/opt/nextcloud/SuperAdmin/files/_TK Docs/Customer Information/_TK - TechKnowligence/Colo notes.txt): failed to open stream: No such file or directory at /var/www/html/nextcloud/lib/private/Files/Storage/Local.php#214|2018-05-04T10:43:01-0500|
|Error|PHP|fopen(/opt/nextcloud/SuperAdmin/files/_TK Docs/Customer Information/_TK - TechKnowligence/DWMLayer3 switch config.txt): failed to open stream: No such file or directory at /var/www/html/nextcloud/lib/private/Files/Storage/Local.php#282|2018-05-04T10:43:00-0500|
|Error|PHP|fopen(/opt/nextcloud/SuperAdmin/files/_TK Docs/Customer Information/_TK - TechKnowligence/DWM-ssg5gt config.txt): failed to open stream: No such file or directory at /var/www/html/nextcloud/lib/private/Files/Storage/Local.php#282|2018-05-04T10:43:00-0500|
|Error|PHP|fopen(/opt/nextcloud/SuperAdmin/files/_TK Docs/Customer Information/_TK - TechKnowligence/CoreXchange colo info.txt): failed to open stream: No such file or directory at /var/www/html/nextcloud/lib/private/Files/Storage/Local.php#282|2018-05-04T10:42:59-0500|
|Error|PHP|fopen(/opt/nextcloud/SuperAdmin/files/_TK Docs/Customer Information/_TK - TechKnowligence/Colo notes.txt): failed to open stream: No such file or directory at /var/www/html/nextcloud/lib/private/Files/Storage/Local.php#282|2018-05-04T10:42:59-0500|

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

<?php
$CONFIG = array (
  'passwordsalt' => 'xxxxxxxx',
  'secret' => 'xxxxxxxx',
  'trusted_domains' => 
  array (
    0 => 'xxxxxxxx',
    1 => 'xxxxxxxx',
  ),
  'datadirectory' => '/opt/nextcloud',
  'dbtype' => 'mysql',
  'version' => '13.0.2.1',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'instanceid' => 'xxxxxxxx',
  'mysql.utf8mb4' => true,
  'dbuser' => 'xxxxxxxx',
  'dbpassword' => 'xxxxxxxx',
  'installed' => true,
  'default_language' => 'en',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'filelocking.enabled' => 'true',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 0.0,
  ),
  'defaultapp' => 'files',
  'knowledgebaseenabled' => true,
  'allow_user_to_change_display_name' => true,
  'remember_login_cookie_lifetime' => 1296000,
  'session_lifetime' => 86400,
  'session_keepalive' => true,
  'auth.bruteforce.protection.enabled' => true,
  'mail_domain' => 'techknowligence.com',
  'mail_from_address' => 'noreply',
  'mail_smtpmode' => 'smtp',
  'mail_smtphost' => 'smtp.mailgun.org',
  'mail_smtpport' => 465,
  'mail_smtpsecure' => 'ssl',
  'mail_smtpauth' => 1,
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpname' => 'xxxxxxxx',
  'mail_smtppassword' => 'xxxxxxxx',
  'maintenance' => false,
  'data-fingerprint' => 'xxxxxxxx',
  'overwrite.cli.url' => 'https://xxxxxxxx',
);

The output of your Apache/nginx/system log in /var/log/apache2/error.log:

[Fri May 04 13:17:02.791119 2018] [proxy_fcgi:error] [pid 40363:tid 140643502307072] (70007)The timeout specified has expired: [client 204.110.188.38:64462] AH01075: Error dispatching request to : (reading input brigade)
[Fri May 04 13:24:56.906017 2018] [authz_core:error] [pid 40361:tid 140643561056000] [client 204.110.188.38:64665] AH01630: client denied by server configuration: /var/www/html/nextcloud/config
[Fri May 04 13:36:05.367701 2018] [authz_core:error] [pid 40361:tid 140643493914368] [client 204.110.188.38:64867] AH01630: client denied by server configuration: /var/www/html/nextcloud/config
[Fri May 04 15:36:44.571805 2018] [core:warn] [pid 40353:tid 140644185091008] AH00045: child process 40363 still did not exit, sending a SIGTERM
[Fri May 04 15:36:46.574318 2018] [core:warn] [pid 40353:tid 140644185091008] AH00045: child process 40363 still did not exit, sending a SIGTERM
[Fri May 04 15:36:48.576569 2018] [core:warn] [pid 40353:tid 140644185091008] AH00045: child process 40363 still did not exit, sending a SIGTERM
[Fri May 04 15:36:50.578831 2018] [core:error] [pid 40353:tid 140644185091008] AH00046: child process 40363 still did not exit, sending a SIGKILL
[Fri May 04 15:36:51.580502 2018] [mpm_event:notice] [pid 40353:tid 140644185091008] AH00491: caught SIGTERM, shutting down
[Fri May 04 15:36:51.926768 2018] [mpm_event:notice] [pid 42542:tid 140341216705472] AH00489: Apache/2.4.29 (Ubuntu) OpenSSL/1.1.0g configured -- resuming normal operations
[Fri May 04 15:36:51.927400 2018] [core:notice] [pid 42542:tid 140341216705472] AH00094: Command line: '/usr/sbin/apache2'

/opt/nextcloud folder permissions

I’ve reapplied permissions / ownership to the data directory

chown -R www-data:www-data nextcloud
find nextcloud/ -type d -exec chmod 750 {} ;
find nextcloud/ -type f -exec chmod 640 {} ;

drwxr-x---  6 www-data www-data 4096 Apr 26 20:28 '_TK - TechKnowligence'

Could you maybe outline how you’ve moved servers for those of us who weren’t there to witness it please? :wink:

followed the instructions to backup / restore - I had updated the old server to the same NC version as the new server (being a clean install - ubuntu / LAMP / etc.)

I believe I found the issue… I had to move the shared folder out of the way, create a new share and mv all those files back in – then run files:scan --all again

It seems to have resolved the problem(s)