PHP Error: disk_free_space()

Hi Everyone my log file of my nextcloud load this error . I searched many solutions and most them explains about the ngix server that isn’t my case, my server doesn’t have ngix server installed.

Error: disk_free_space(): File or directory inexistent at /var/www/html/nextcloud/lib/private/Files/Storage/Local.php#381

  1. <>OC\Log\ErrorHandler::onError(2, “disk_free_s … e”, “/var/www/ht … p”, 381, { path: "ARL … "})
  2. /var/www/html/nextcloud/lib/private/Files/Storage/Local.php - line 381:disk_free_space("/var/www/ht … s")
  3. /var/www/html/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 334:OC\Files\Storage\Local->free_space(“Folder1/72 … T”)

Sorry, about my english.

Coud Someone help? :roll_eyes:

Perhaps a problem with disk_free_space (issue)

Test to change line 381 in /var/www/html/nextcloud/server/lib/private/Files/Storage/Local.php

$space = false;

Perhaps you must set a real value or set in the next line:
return \OCP\Files\FileInfo::SPACE_UNKNOWN;
Or copy code from line 381 from here.

Please post your Nextcloud version.
I think a problem till Nextcloud 21.

1 Like

The version is 23

The line in the my file Local.php has the same code of the link.

I don’t know if I did the right but I solved the problem commenting the line 372 untill 387 present in the link that you put

Thanks!!

Same problem here with server 23.0.2 running on Apache. As @devnull pointed out, I checked my code against the link to github he mentions but both are the same.
Commenting out the whole function as suggested by @celso.vss doesn’t make much sense to me.

Hi, I found a related issue. It seems it will be fixed in the “next” (after 23.0.2) version : https://github.com/nextcloud/server/pull/30985

I am still having this issue on NC release 25.0.3 and the lines are like suggested.