Error: disk_free_space(): No such file or directory at /.../nextcloud/lib/private/Files/Storage/Local.php#420

The issue you are facing:

 I am experiencing troubles in syncing my local Directory with NC server (25.0.3) using the latest client in Windows 11.

The error I get into the Server log is:
Error: disk_free_space(): No such file or directory at /volume1/web/nextcloud/lib/private/Files/Storage/Local.php#420

It seems to be related to an improper unjail path.
Before updating to 25.0.3 (I was on 25.0.2 until last week) everything seemd to work correct (even if I had many exif data read errors...)

Is this the first time you’ve seen this error? Y

Nextcloud version: 25.0.3.2
Operating system and version: Linux 4.4.180+ #42962 SMP Wed Sep 21 10:56:01 CST 2022 aarch64 GNU/Linux synology_rtd1296_ds418
Apache or nginx version: Apache 2.4
PHP version : PHP Version => 8.0.23

Steps to replicate it:

each time I try to sync from the latest client under win 11 I have the same error

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

$CONFIG = array (
  'instanceid' => 'ocj0r2y52y4o',
  'passwordsalt' => '***OMISSIS***',
  'secret' => '***OMISSIS***',
  'trusted_domains' =>
  array (
    0 => '10.168.43.252',
    1 => 'scarpam.dynu.net',
  ),
  'datadirectory' => '/volume1/web/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '25.0.3.2',
  'overwrite.cli.url' => 'http://10.168.43.252/nextcloud',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'dbmaster',
  'dbpassword' => '***OMISSIS***',
  'installed' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'bulkupload.enabled' => true,
  'maintenance' => false,
  'default_phone_region' => 'IT',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'scarpam72',
  'mail_domain' => 'gmail.com',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'smtp.****.***',
  'mail_smtpport' => '465',
  'mail_smtpname' => 'sc***@****m',
  'mail_smtppassword' => '***OMISSIS***',
  'mail_smtpsecure' => 'ssl',
  'loglevel' => 2,
  'updater.release.channel' => 'stable',
);

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

{"reqId":"GVBUVg39qhdU8vC5ooaT","level":3,"time":"2023-01-23T16:31:09+00:00","remoteAddr":"151.31.118.161","user":"maurizio.scarpa","app":"PHP","method":"PUT","url":"/remote.php/dav/files/maurizio.scarpa/New%20ASe3/Amministrazione/Pratiche%20e%20documenti%20ufficiali/Verbali%20assemblea/20190430%20-%20Verbale%20assemblea%20dei%20soci%20ASe3%20srl.doc","message":"disk_free_space(): No such file or directory at /volume1/web/nextcloud/lib/private/Files/Storage/Local.php#420","userAgent":"Mozilla/5.0 (Windows) mirall/3.6.6stable-Win64 (build 20230119) (Nextcloud, windows-10.0.22621 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"25.0.3.2","exception":{"Exception":"Error","Message":"disk_free_space(): No such file or directory at /volume1/web/nextcloud/lib/private/Files/Storage/Local.php#420","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::","args":[2,"disk_free_space(): No such file or directory","/volume1/web/nextcloud/lib/private/Files/Storage/Local.php",420]},{"file":"/volume1/web/nextcloud/lib/private/Files/Storage/Local.php","line":420,"function":"disk_free_space","args":["/volume1/web/nextcloud/data/maurizio.scarpa/files/New ASe3/Amministrazione/Pratiche e documenti ufficiali/Verbali assemblea"]},{"file":"/volume1/web/nextcloud/lib/private/Files/Storage/Wrapper/Quota.php","line":110,"function":"free_space","class":"OC\\Files\\Storage\\Local","type":"->","args":["files/New ASe3/Amministrazione/Pratiche e documenti ufficiali/Verbali assemblea/20190430 - Verbale assemblea dei soci ASe3 srl.doc"]},{"file":"/volume1/web/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php","line":335,"function":"free_space","class":"OC\\Files\\Storage\\Wrapper\\Quota","type":"->","args":["files/New ASe3/Amministrazione/Pratiche e documenti ufficiali/Verbali assemblea/20190430 - Verbale assemblea dei soci ASe3 srl.doc"]},{"file":"/volume1/web/nextcloud/lib/private/Files/View.php","line":1181,"function":"free_space","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->","args":["files/New ASe3/Amministrazione/Pratiche e documenti ufficiali/Verbali assemblea/20190430 - Verbale assemblea dei soci ASe3 srl.doc"]},{"file":"/volume1/web/nextcloud/lib/private/Files/View.php","line":1127,"function":"basicOperation","class":"OC\\Files\\View","type":"->","args":["free_space","/New ASe3/Amministrazione/Pratiche e documenti ufficiali/Verbali assemblea/20190430 - Verbale assemblea dei soci ASe3 srl.doc"]},{"file":"/volume1/web/nextcloud/apps/dav/lib/Connector/Sabre/QuotaPlugin.php","line":244,"function":"free_space","class":"OC\\Files\\View","type":"->","args":["New ASe3/Amministrazione/Pratiche e documenti ufficiali/Verbali assemblea/20190430 - Verbale assemblea dei soci ASe3 srl.doc"]},{"file":"/volume1/web/nextcloud/apps/dav/lib/Connector/Sabre/QuotaPlugin.php","line":205,"function":"getFreeSpace","class":"OCA\\DAV\\Connector\\Sabre\\QuotaPlugin","type":"->","args":["/New ASe3/Amministrazione/Pratiche e documenti ufficiali/Verbali assemblea/20190430 - Verbale assemblea dei soci ASe3 srl.doc"]},{"file":"/volume1/web/nextcloud/apps/dav/lib/Connector/Sabre/QuotaPlugin.php","line":97,"function":"checkQuota","class":"OCA\\DAV\\Connector\\Sabre\\QuotaPlugin","type":"->","args":["/New ASe3/Amministrazione/Pratiche e documenti ufficiali/Verbali assemblea/20190430 - Verbale assemblea dei soci ASe3 srl.doc"]},{"file":"/volume1/web/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"beforeCreateFile","class":"OCA\\DAV\\Connector\\Sabre\\QuotaPlugin","type":"->","args":["files/maurizio.scarpa/New ASe3/Amministrazione/Pratiche e documenti ufficiali/Verbali assemblea/20190430 - Verbale assemblea dei soci ASe3 srl.doc",null,{"__class__":"OCA\\DAV\\Connector\\Sabre\\Directory"},false]},{"file":"/volume1/web/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1094,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["beforeCreateFile",["files/maurizio.scarpa/New ASe3/Amministrazione/Pratiche e documenti ufficiali/Verbali assemblea/20190430 - Verbale assemblea dei soci ASe3 srl.doc",null,{"__class__":"OCA\\DAV\\Connector\\Sabre\\Directory"},false]]},{"file":"/volume1/web/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":504,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->","args":["files/maurizio.scarpa/New ASe3/Amministrazione/Pratiche e documenti ufficiali/Verbali assemblea/20190430 - Verbale assemblea dei soci ASe3 srl.doc",null,null]},{"file":"/volume1/web/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/volume1/web/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["method:PUT",[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/volume1/web/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/volume1/web/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/volume1/web/nextcloud/apps/dav/lib/Server.php","line":360,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/volume1/web/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"/volume1/web/nextcloud/remote.php","line":171,"args":["/volume1/web/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/volume1/web/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"},"id":"63ceb64de9315"}```

I am having the same NC version and the same error. Wonder if you have found the solution for this?

Sadly I have no solution.
I reinstalled everything from scratch and that problem disappeared but I am still struggling to have a smooth sync.

Each time I am experiencing file truncation and 504 gateway time-out errors.

This release and the hw i am using (synology ds418) can’t stay in peace.

I am having tons of issues with nginx reverse proxy running on the synology piece of hardware.