Update Nextcloud / Share Files not possible

i am running a NC13 with php5. Last weekend i updated php5 to php7, then php 7.2. After that i updated NC13 all the way to NC16. Everything seemed to work fine, but if i Share Files, the Mail gets delivered, but after opening the link there comes a message “no File available, probably deleted…” i used a backup to NC15 and PHP7.0 but the same error occured. After some testing i used the backup back to NC13 with php5.
Does anyone know this error or what i can do to prevent it? P.s. now i have no NC 15 or 16 running, but i have backups of these states

Hi Frederic,

had a similar problem and solved it the following way:

  • ssh to your NC instance
  • cd to your NC webserver folder (example /var/www/nextcloud)
    $ sudo - u www-data php occ files:scan

This will perform a file scan of your instance.
After the job finished (this can take a while according to your available files) try again the sharing…

Hope this will work for you as well…


  • $ sudo -u www-data php occ db:add-missing-indices
    Should be a fine thing as well…just in case…

Thank you very much for your help. I would recover the NC16 from the Backup and try these steps on the weekend.

P.s. add-missing-indices i already tryed last time but i can try it again after files:scan

You are welcome.

I wish you good luck for the weekend! Hopefully it will work like it did in my case…


i tried the occ files:scan --all and also occ db:add-missing-indices but the error is the same. Are there other things i can try to fix it?

Please does someone has a clue what i can do? i don’t want to reinstall nc and migrate all data

We have the same problem. We need this feature very urgently. Can someone tell us what we can do?

mhm seems like nobody has a clue what we can do. Probably really reinstalling nc :frowning: