Cannot access files through the web interface after I trucated the filecache

Nextcloud version (eg, 12.0.2): 14.0.3
Operating system and version (eg, Ubuntu 17.04): Ubuntu 16.04
Apache or nginx version (eg, Apache 2.4.25): don’t know
PHP version (eg, 7.1): 7.0.15-0ubuntu0.16.04.4

The issue you are facing:

When I open the webinterface as a standard user or a new admin user, I immediately get the error message “File could not be found” on top of the screen. When I click on a folder shared with that specific user, I get “This operation is forbidden” on top of the screen. I cannot access to the folders shared with that user.

However, when I use my original admin user, I can still enter every folder without a problem. Creating a new user with new shares does not solve the problem.

The problem occured after I messed around with either the file_locks or the filecache table some time ago, I cannot remember which table it was. I truncated that table manually if I remember correctly. In the meantime, there are some entries back in the filecache and file_locks. I performed an update to 14.xx after that and hoped, that the error would disappear after the update.

I am on a webhosting instance where I only have limited privileges to run commands: no su/sudo, no occ, no manual php script start. Is there anything i can do?

In the administration overview i get this message, don’t know if that has anything to do with it:

The database is missing some indexes. Due to the fact that adding indexes on big tables could take some time they were not added automatically. By running "occ db:add-missing-indices" those missing indexes could be added manually while the instance keeps running. Once the indexes are added queries to those tables are usually much faster.

    Missing index "share_with_index" in table "oc_share".
    Missing index "parent_index" in table "oc_share".
    Missing index "fs_mtime" in table "oc_filecache".

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

Steps to replicate it:

Don’t know

The output of your Nextcloud log in Admin > Logging:


Zum Hauptinhalt springen
Zum Navigationsbereich der App springen
Level	App	Message	Time
Error	PHP	You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/clients/client61/web97/web/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18	a few seconds ago
Error	PHP	You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/clients/client61/web97/web/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18	a few seconds ago
Error	PHP	You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/clients/client61/web97/web/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18	a few seconds ago
Error	PHP	You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/clients/client61/web97/web/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18	a few seconds ago
Error	PHP	You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/clients/client61/web97/web/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18	a few seconds ago
Error	PHP	You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/clients/client61/web97/web/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18	a few seconds ago
Error	PHP	You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/clients/client61/web97/web/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18	a few seconds ago
Error	PHP	You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/clients/client61/web97/web/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18	a few seconds ago
Error	PHP	You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/clients/client61/web97/web/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18	a few seconds ago
Error	PHP	You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/clients/client61/web97/web/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18	a few seconds ago
Error	PHP	You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/clients/client61/web97/web/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18	a few seconds ago
Error	PHP	You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/clients/client61/web97/web/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18	a few seconds ago
Error	PHP	You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/clients/client61/web97/web/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18	a few seconds ago
Error	PHP	You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/clients/client61/web97/web/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18	a few seconds ago
Error	PHP	You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/clients/client61/web97/web/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18	a few seconds ago
Error	PHP	You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/clients/client61/web97/web/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18	a few seconds ago
Error	PHP	You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/clients/client61/web97/web/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18	a few seconds ago
Error	PHP	You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/clients/client61/web97/web/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18	a few seconds ago
Error	PHP	You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/clients/client61/web97/web/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18	a few seconds ago
Error	PHP	You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/clients/client61/web97/web/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18	a few seconds ago
Error	PHP	You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/clients/client61/web97/web/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18	a few seconds ago
Error	PHP	You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/clients/client61/web97/web/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18	a few seconds ago
Error	PHP	You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/clients/client61/web97/web/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18	a few seconds ago
Error	PHP	You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/clients/client61/web97/web/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18	a few seconds ago
Error	PHP	You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/clients/client61/web97/web/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18	a few seconds ago
Error	PHP	You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/clients/client61/web97/web/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18	a few seconds ago
Error	PHP	You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/clients/client61/web97/web/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18	a few seconds ago
Error	PHP	You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/clients/client61/web97/web/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18	a few seconds ago
Error	PHP	You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/clients/client61/web97/web/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18	a few seconds ago
Error	PHP	You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/clients/client61/web97/web/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18	a few seconds ago
Error	PHP	You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/clients/client61/web97/web/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18	a few seconds ago
Error	PHP	You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/clients/client61/web97/web/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18	a few seconds ago
Error	PHP	You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/clients/client61/web97/web/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18	a few seconds ago
Error	PHP	You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/clients/client61/web97/web/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18	a few seconds ago
Error	PHP	You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/clients/client61/web97/web/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18	a few seconds ago
Error	PHP	You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/clients/client61/web97/web/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18	a few seconds ago
Error	PHP	You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/clients/client61/web97/web/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18	a few seconds ago
Error	PHP	You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/clients/client61/web97/web/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18	a minute ago
Error	PHP	You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/clients/client61/web97/web/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18	a minute ago
Error	PHP	You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/clients/client61/web97/web/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18	a minute ago
Error	PHP	You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/clients/client61/web97/web/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18	a minute ago
Error	PHP	You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/clients/client61/web97/web/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18	2 minutes ago
Error	PHP	You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/clients/client61/web97/web/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18	2 minutes ago
Error	PHP	You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/clients/client61/web97/web/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18	2 minutes ago
Error	PHP	You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/clients/client61/web97/web/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18	2 minutes ago
Error	PHP	You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/clients/client61/web97/web/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18	2 minutes ago
Error	PHP	You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/clients/client61/web97/web/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18	2 minutes ago
Error	PHP	You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/clients/client61/web97/web/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18	2 minutes ago
Error	PHP	You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/clients/client61/web97/web/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18	3 minutes ago

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

<?php
$CONFIG = array (
  'instanceid' => 'ociz1y3j4fvf',
  'passwordsalt' => 'xxx',
  'secret' => 'xxx',
  'trusted_domains' =>
  array (
    0 => 'xxxxx',
  ),
  'datadirectory' => '/var/www/clients/client61/web97/web/nextcloud/data',
  'overwrite.cli.url' => 'xxxxx',
  'dbtype' => 'mysql',
  'version' => '14.0.3.0',
  'dbname' => 'c61nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'c61nextcloud',
  'dbpassword' => 'xxxxx!',
  'installed' => true,
  'mail_from_address' => 'xxxxx',
  'mail_smtpmode' => 'php',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_domain' => 'xxx',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => '\\OCA\\User_LDAP\\LDAPProviderFactory',
  'updater.secret' => '$2y$10$IJpPN6w2h6rCFHvYyBkIo..zTtwJ7EPxdo20QUMZhY4I7jy/sjakO',
  'updater.release.channel' => 'stable',
);

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

PASTE HERE

You will need to somehow manage to perform a

occ flies:scan --all

on your NC instance. The filecache is the place, whre NC stores the location of the files. You don’t have that one right, you will not be able to access your files. Also, you will loose all your shares, because these also depend on the entries in the oc_filecache table.

So, for you the question will be… is there an option to run any occ command from the web interface and I actually doubt it.

I wonder though, how you then managed to screw-up your filecache, but that was probably using phpMyAdmin or something similar.

Yes i used PHPMyadmin to blow up the filecache… thanks for your answer, i will contact our IT service desk to find someone with the privileges to start that command.

Okay, just for completeness, the command will have to be issued under the webserver user account, probably apache or nginx:

sudo -u apache php </path/to/occ> files:scan --all (CentOS /Fedora)
sudo -u www-data php </path/to/occ> files:scan --all (Debian based /Ubuntu)

or

sudo -u nginx php </path/to/occ> files:scan --all (Nginx, all distros)