@jajaX
I started up my Raspberry PI (model 4b 4GB with RaspiOS (bullseye), kernel 5.15.32-v7l+, Apache/2.4.54 (Raspbian), PHP 7.4.30) so probably the same as yours.
And COPS 1.1.3 installed from the zip.
I tried some stuff but could not reproduce your error.
Can you please post your config_local.php (and any other changes you made to config_default.php).
Can you show the properties on the Raspberry Pi of a calibre library and an e-book that gives a 0Kb size after downloading.
Example: ( ls -l ./calibrefree )
Code:
drwxr-xr-x 4 pi pi 4096 Jun 25 2018 'Alexandre Dumas'
drwxr-xr-x 10 pi pi 4096 Jun 25 2018 'Arthur Conan Doyle'
drwxr-xr-x 3 pi pi 4096 Jun 25 2018 'H. G. Wells'
drwxr-xr-x 3 pi pi 4096 Jun 25 2018 'Jack London'
drwxr-xr-x 4 pi pi 4096 Jun 25 2018 'Lewis Carroll'
-rwxr-xr-x 1 pi pi 368640 Jun 25 2018 metadata.db
-rwxr-xr-x 1 pi pi 13569 Jun 25 2018 metadata_db_prefs_backup.json
cd ./calibrefree/Alexandre\ Dumas/The\ Three\ Musketeers\ \(7\)/
ls -l
Code:
-rwxr-xr-x 1 pi pi 543785 Jun 25 2018 cover.jpg
-rwxr-xr-x 1 pi pi 4381052 Jun 25 2018 'The Three Musketeers - Alexandre Dumas.epub'