[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ā€.

12 Likes

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

2 Likes

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:

4 Likes

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

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