File size showing zero with per-user encryption keys (

Hi,

On a Nextcloud 34 instance, I ran occ scan for my user because I saw some files having the size set as 0 in the web ui and mobile app. After that scan, most of the files showed a file size of 0 in the web ui and mobile app. The actual file size on the server and on the clients is OK. In the oc_filecache table, the files are indeed having a size of 0.

In the log files, when running a scan with--generate-metadata,I am seeing a lot of DecryptionFailedExceptionCannot decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you. Couldn't re-calculate unencrypted size for...

I am using per-user encryption keys.

So I am wondering:

  • Am I hitting a bug?
  • How to re-encrypt / make the encryption work with the scan job?

Thx for your help/reply.

G.

And if the user opens and accesses the file, does this value update? If the user adds a new file?

When a user opens and accesses the file thru the web interface, the file size value is not updated.

When a new file is added, or the file is editted, the file size value is correctly updated.

Hi,
It seems that, like me, you are hit by this bug : Wrong unencrypted_size for legacy base64 files: block size is read before the file header is applied · Issue #63662 · nextcloud/server · GitHub