Cause #2Attachment Checkout plugin is installedWe have a user reported that Attachment Checkout plugin is one of the root cause of this issue. For resolution, please disable or uninstall it.

Cause #3Ancestors table

The CONFANCESTORS table (which is used to speed up permission checks on parent-child page relationship) is broken. There are multiple records for a single page, which causes Confluence to fire multiple events. For each event, Confluence moves the attachment to the new folder, hence, subsequent events fail due to the "missing" folder.