If you have been using ownCloud with the desktop client you may come across a checksum error when you sync documents with your ownCloud server. In some cases, there is a connection or configuration issue that is causing the problem. In most cases, it is actually a bug that may be the source of the errors. Information about a bug in ownCloud that has created checksum errors and an overview of checksum errors that are not caused by an ownCloud bug are covered in this article.
ownCloud Checksum Error Bug
In 2023, there was a bug introduced in ownCloud 10.12. It causes an ownCloud checksum error when trying to sync files that are on external storage. FTP, SFTP, and other external storage sources like Google Drive are affected by the bug. The good news is that ownCloud has identified that bug and a patch has been approved on the ownCloud Github project. The specific fix is listed under Pull Request #40832 Ensure the requested open mode is set in the checksum wrapper.
9/5/2023 Update: The following bug will be fixed if you update ownCloud to version 10.13. The following patch was applied in that version according the change log.
If you are receiving the following errors in the ownCloud Desktop Client, the issue is likely caused by a bug in the ownCloud code.
- If the downloaded file does not match the checksum, it will be resumed.
- Server replied "400 Bad Request" to "PUT filelocation” (The computed checksum does not match the one received from the client.)
Above: screenshot photo of the checksum error in the ownCloud Desktop Client.
Also, if you have these errors in the ownCloud server log (owncloud.log), it is likely caused by the 2023 bug.
- "user":"owncloud","app":"webdav","method":"PUT","url":"\/owncloud\/remote.php\/dav\/files Exception: HTTP\/1.1 400 The computed checksum does not match the one received from the client.: {\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\BadRequest\",\"Message\":\"The computed checksum does not match the one received from the client.
ownCloud Checksum Error Fix
ownCloud has approved a patch that will be released in the next version of ownCloud. That may take several weeks, however. A server that is experiencing this issue can be patched by applying the code changes that are listed on GitHub pull request #40832.
Below are the directions to install the patch on a live ownCloud server.
- Turn ownCloud maintenance mode on. Command: sudo -u www-data ./occ maintenance:mode --on
- On most systems, you can SSH into the server with a command line tool (Putty, MobaXterm, etc) and then cd to the ownCloud root directory to run the command. It's where the occ file is located.
- Standard installs are located at /var/www/owncloud
- Stop the Apache server. Command on Ubuntu systems: sudo service apache2 stop
- Verify that ownCloud cannot be accessed over the web and through the desktop client.
- Download/backup copies of the current lib/private/Files/Storage/Wrapper/Checksum.php and lib/private/Files/Stream/Checksum.php files. Just in case there is a need to roll back.
- Edit the file lib/private/Files/Storage/Wrapper/Checksum.php (This can be done in the command line using nano or with a client like WinSCP, etc).
- The changes listed in the GitHub Pull Request need to be made to the file. They are listed here: https://github.com/owncloud/core/pull/40832/files
- You would just change the lines in red to the ones in green.
- An alternative is to upload the new file.
- Edit the file lib/private/Files/Stream/Checksum.php file
- Changes are listed here: https://github.com/owncloud/core/pull/40832/files
- Same process as #5
- Disable maintenance mode. Command: sudo -u www-data ./occ maintenance:mode --off
- Start the Apache server. Command (Ubuntu): sudo service apache2 start
- Verify the changes worked.
That is all that is needed to be done to fix the checksum issue. NavFile has tested the fix and it works.
If you need help with this, please feel free to contact us.
ownCloud Checksum Error – Other Problems – Not a Bug
Sometimes you may encounter a checksum error that is not caused by the 2023 ownCloud checksum bug. Checksum errors are caused by an issue that makes the file corrupt. In most cases, it is the file that is on the computer that the ownCloud client is trying to sync with the ownCloud server.
As described by the ownCloud team, the source of checksum issues can be hard to find. A configuration issue or just some type of file corruption may have been introduced somewhere on the client PC or the server. Metadata may have been corrupted and the file contents in
The following steps can be taken to potentially solve a checksum issue. (listed by the ownCloud team here)
- Download the file from the ownCloud web interface. Then reupload the file by putting it in the same folder that the file was in on your computer. The desktop/computer client will then reupload the file and the problem should go away.
- If there are several files that need to be fixed, you can use the ownCloud occ command to perform a checksum verification. The command to do this I occ files:checksums:verify -r . On a standard ownCloud, you would navigate to the base directory (where occ is located) and then run sudo -u www-data ./occ files:checksums:verify -r
- Another option is to run occ files:scan --path . After the --, replace path with the path where the problem files are.
The only issue you may run into is that the files themselves are actually corrupt and the checksum was good. In many cases, the metadata was just corrupted and the file on the server was okay.
Please feel free to contact the NavFile team if you need further assistance with ownCloud and checksum errors.