Files and Folders disappearing

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face: is for home/non-enterprise users. If you’re running a business, paid support can be accessed via 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:


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


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): 18.0.1
Operating system and version (eg, Ubuntu 20.04): Ubuntu Server
Apache or nginx version (eg, Apache 2.4.25):
PHP version (eg, 7.1):

The issue you are facing:

Seemingly randomly we have files disappearing, and there is no reason to it.

A user adds a file, then maybe a week later, the file no longer exists.

The file does exist in the mounted NFS share. The file does not exist in oc_filecache in the DB.

Running occ files:scan --all will re-pull the file and it will show up again in the UI and in the DB.
Since the file doesn’t exist, it ends up breaking any shares to the file. Additionally, rescanning the file system and it re-pulling the file gives it a new ID, and it needs to be re-shared again.

As for the logs, I saw nothing in it that pertains to files other than when someone clicks on a saved link to a file, in this case a document that opens through onlyoffice.

Any ideas as to why this might be happening? It is just a random file entirely. Other files still exist.

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

Steps to replicate it:

  1. I can’t

The output of your Nextcloud log in Admin > Logging:

{"reqId":"n6BFaOVLoGkauybvsidT","level":3,"time":"2020-05-16T04:31:09+00:00","remoteAddr":"","user":"<removed>","app":"PHP","method":"GET","url":"/ocs/v2.php/core/whatsnew?format=json","message":"Undefined index: changelogURL at /var/www/html/nextcloud/core/Controller/WhatsNewController.php#91","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0","version":""}
{"reqId":"Aa1GaExNbCvs2tZR6H2U","level":4,"time":"2020-05-16T04:32:12+00:00","remoteAddr":"","user":"<removed>","app":"onlyoffice","method":"GET","url":"/index.php/apps/onlyoffice/ajax/config/11697?filePath=%2FInOfficeSchedule.xlsx","message":"Config: 11697 File not found","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0","version":""}

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

$CONFIG = array (
  'instanceid' => '<removed>',
  'passwordsalt' => '<removed>',
  'secret' => '<removed>',
  'log_type' => 'file',
  'logfile' => '/mnt/NextcloudNFS/nextcloud1.log',
  'trusted_domains' =>
  array (
    0 => '',
    1 => '',
    2 => '<removed>',
  'overwriteprotocol' => 'https',
  'datadirectory' => '/mnt/NextcloudNFS/',
  'skeletondirectory' => '',
  'lost_password_link' => 'disabled',
  'dbtype' => 'mysql',
  'version' => '',
  'overwrite.cli.url' => 'https://<removed>',
  'dbname' => 'nextcloud',
  'dbhost' => '',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => '<removed>',
  'installed' => true,
  'trusted_proxies' =>
  array (
    0 => '',
    1 => '',
  'forwarded_for_headers' =>
  array (
    0 => 'HTTP_X_FORWARDED',
  'onlyoffice' =>
  array (
    'verify_peer_off' => true,
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '<removed>',
    'port' => 6379,
    'timeout' => 0.0,
    'password' => '<removed>',
    'dbindex' => 0,
  'app_install_overwrite' =>
  array (
    0 => 'drawio',
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'theme' => '',
  'loglevel' => 2,
  'maintenance' => false,
  'mail_from_address' => 'nextcloud',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => '<removed>',
  'mail_smtphost' => '<removed>',
  'mail_smtpport' => '465',
  'mail_smtpsecure' => 'tls',

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

<VirtualHost *:80>
   DocumentRoot "/var/www/html/nextcloud"
   ServerName <removed>

<Directory "/var/www/html/nextcloud/">
   Options MultiViews FollowSymlinks
   AllowOverride All
   Order allow,deny
   Allow from all

SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
TransferLog /var/log/apache2/nextcloud_access.log
ErrorLog /var/log/apache2/nextcloud_error.log