Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Deleted files sometimes aren't deleted properly due to timestamp conflict #23151
Steps to reproduce
Deleted files may not be presented by the server on its original path as regular files
Deleted file is unlinked on underlying storage (on path 'data/userid/files/dir1/file.txt'), but is still presented together with other regular files on its original path on web, and in response to PROPFIND. Download fails with 404 (web) or 503 - Could not open file (sync client). Synchronization stops on that error.
Updated from an older ownCloud or fresh install:
Where did you install ownCloud from:
List of activated apps:
The content of config/config.php:
Are you using external storage, if yes which one: local/smb/sftp/...
Web server error log
ownCloud log (data/owncloud.log)
Weird duplicate key issue when inserting files into the trashbin.
@mirekys did you try deleting these files multiple times in the past ? Maybe something already created the trashbin entries and left them there and now re-deleting the same file fails with this error.
There are about 24 entries with the same id(filename) in the oc_files_trash table for that user. However,
And there really is only one entry for that name in the filecache:
More strangely, the second DELETE (from apache log above) failed partially without any further trace in logs, leaving the following in filecache.
No sign of that particular file in the oc_files_trash:
And the file does no longer exist on the filesystem. I have tried to delete it on the web,
I have managed to reproduce the first problem:
Any news on this? Even if it affects an already deleted files, there still is some potential for data loss. Maybe something more unique like etag+timestamp should be used in a filename. Another way i can think of, is to put deleted files into a directory tree.