Filesize(): stat failed for

every 20 minutes i get this error, but i have delete this file and i havent a versionsfile for it, how i can fix it?

Error PHP filesize(): stat failed for /home/xxx/xxx/files_versions/Arbeit/PGO/Pokemon_GO_Discord_Chat_fur_alle_Fraktionen.docx.v1469520899 at /var/www/nextcloud/lib/private/Files/Storage/Local.php#155

1 Like


Just a guess, but you might want to try running files:cleanup or files:scan again. Example,

./occ files:cleanup
./occ files:scan --all

thanks for your time :slight_smile:
i have try it cleanup say there are 0 files, and the scan say i have the wrong user

sudo -u “webuser” php occ files:cleanup
0 orphaned file cache entries deleted

sudo -u “webuser” php occ files:scan --all
Scanning files for 12 users
Starting scan for user 1 out of 12 (Alv)
Home storage for user Alv not writable
Make sure you’re running the scan command only as the user the web server runs as


The file permissions or ownership are not correct. The user accessing your data directory needs to have write access. Depending on your server set up, this would be the web server, or perhaps the PHP user.


all users can upload files and work with nextcloud,
the web user have all rights on this folder so i cant say why the command “occ files:scan --all” say me i havent the correct ownerships

So I am having this issue now on Nextcloud 18. The error happens every time I upload a new file. Any luck on this?

Is anyone else having this issue after updating to Nextcloud 18 from 17?

[PHP] Error: filesize(): stat failed for /var/www/nextcloud/data/aaron.lawson/files/Test/aaron_lawson_blue_shirt_profile_pic.psd.ocTransferId151376186.part at /var/www/nextcloud/lib/private/Files/Storage/Local.php#170

PUT /remote.php/webdav/Test/aaron_lawson_blue_shirt_profile_pic.psd

Does anyone know if this is something critical or have a solution to this? I wasn’t able to find recent threads with the issue…Any help is greatly apprecaited.

I have exactly the same problem here since the update to Nextcloud 18.
So far I could not find any problems.

Error: filesize(): stat failed for /www/htdocs/…/files/ at /www/htdocs/…/lib/private/Files/Storage/Local.php#170

PUT /remote.php/dav/files/…/
from by … at 2020-01-23T20:08:53+01:00

1 Like

I have the same problem every time to upload a file:

  `  [PHP] Error: filesize(): stat failed for /var/www/html/data/xxxxx/files/xxxxxxxxxx.pdf.ocTransferId641220615.part at /var/www/html/lib/private/Files/Storage/Local.php#170`

PUT /remote.php/webdav/xxxxxxxxx.pdf
from by xxxxxxx at 2020-02-28T16:06:00+00:00

Anyone know what happen?

I have also the same error on 18.0.1. Anyone knows how to fix this?

1 Like

I disabled the new file locking feature and the error went away so I am assuming it has something to do with that…

1 Like

I have the same error… I have also install Temorarly Lock

1 Like

Same as above, it’s related somehow with Temporary Lock add-on.