Open nfp0 opened 1 year ago
Edited the post to add the selection details, as it seems GitHub deselected them all when it reloaded the page because of a character limit.
@szaimen I have noticed you added the 25-feedback
tag.
Does this mean that additional feedback is needed from me? Is anything missing in the report?
Does this mean that additional feedback is needed from me?
No. All good!
Is there any progress on this issue?
I just had this issue when an external storage folder, which is mounted via Samba CIFS failed because of downtime on the storage box provider's end and when triggering a occ files:scan
the external storage folder appeared again, but all files were reindexed so the Desktop Client removed all of them and redownloads them again, which can hardly be the expected behavior
I'd be very glad if this could be addressed, like checking if an external storage is mounted/reachable and not just deleting the files therein from the database, which is my current understanding of the mechanism :)
@jakobkrieger I did not know it triggered the Desktop Client to redownload all the files again, as I was not using using that client. But that makes this issue even worse than I thought! :frowning_face:
⚠️ This issue respects the following points: ⚠️
Bug description
When trying to access a file on Nextcloud but, for some reason, the underlying storage device fails with an I/O error, Nextcloud removes the file from the database silently.
For an unsuspecting user, after solving the storage device problem and restarting Nextcloud, it will find said file has disappeared even though it still exists on the Nextcloud data directory. This happens silently, so a user might find out months later that many of his files have mysteriously vanished.
The files can be added back by re-scanning the data directory, but that is assuming the user ever finds out that these files have been disappearing. There are no Warning or Error logs about this either.
I could only trigger this bug by downloading big folders with multiple files through the web interface and having a storage I/O error during the download, but there might be other ways to trigger it.
The behavior seems similar to the one described here: https://help.nextcloud.com/t/content-wiped-out-from-database-after-storage-unmounted/89534
Steps to reproduce
I'll describe how I can trigger the bug consistently on an external HDD, but there might be other ways to trigger it.
Expected behavior
Nexcloud should provide an error message in the log, but should never assume a file has been deleted just because of an I/O error.
Installation method
Community Docker image
Operating system
Other
PHP engine version
PHP 8.1
Web server
Apache (supported)
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Fresh Nextcloud Server install
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
Additional info
OS: Arch Linux