[NC 18.0] Attention! Possible loss of all your shares. Better implement fix now

Hello everybody,

I ran into an issue on Nextcloud 18 that all the shares, which the users on my server created, were suddenly deleted. The database table “oc_share” was completely empty and so there was no more internal or public share available.

It turned out, that due to a bug the whole “oc_share” database table gets wiped, when one NC user removes a federated share:

A fix has already been provided by the developers, however it will first rollout with the next release and therefor some time will pass, were you might lose your shares.
So in case, you use federated shares, or just allowed federated sharing to your users, better act fast and implement the fix yourself.

Luckily the fix is easy to implement:

I hope none of you loses his shares!

By the way: in case you notice the issue that sharing a file or folder internally to another user throws an error message, this is caused by the app “Maps”:

This also has been fixed already and will be available with the next version/ release of “Maps”. Until then it helps to disable the app “Maps”.


whoa! :eyes:
nice little bug there! :man_facepalming:

so thanks very much for bringing that one out here and making it sticky! (as well as hinting to other existing problems)

and since this seems to be the place where update-caution-messages seem to be collected… don’t forget about this one as well…

happy hacking


Hey @Schmu,

thanks a lot!

Patch done :mask::sweat_smile::cloud:

1 Like

Good catch. I ran into this issue as well but I related it to a change of a hostname I did recently. The entries weren’t updated properly, I had to fix the database manually and I thought to have missed something there.

Wow thanks !!!
This bug happened to me last Monday ! :dizzy_face:
I quickly analyzed that the oc_share table was empty but I didn’t understand why and how! I spent more than 3 hours looking at all the logs of my server and I didn’t find anything wrong. I concluded it was a bug…

Fortunately my database backups allowed me to restore the oc_share table and everything was restored ! :star_struck:

Since Monday I wanted to come and open a topic here and I’m happy to see that it’s really a “bug” whose origin has been found and fixed.
Great work for finding bug and thanks to the nextcloud community.

Backups save lives and have saved mine. Do your backups: database and files!
Long live to nextcloud :heart:


I just have this bug i noticed that my next cloud folder is completely empty, the whole folder has disappeared.
Except the 3 files :

I did not delete the file of course, it disappeared by itself.
I think I have a copy of all the documents present, but it is still annoying
The last time I used next clound it was 8 days ago, and everything was fine.
I even have on the “activity” the history of me creating folder and adding new file and on the history we don’t see a “delete command” anywhere so i assume all the data get removed like that with no reason. I would like to recover my files because they are important.
I am not the owner off this next cloud server.
How can i do to backup all the file?

Thank you for your help in advance.

Please contact the owner to get the files. They are not lost as you can see from previous posts.

This one is fixed in release of NC v18.0.1
See https://github.com/nextcloud/server/pull/19278

1 Like