Error: disk_free_space(): No such file or directory at /var/www/nextcloud

Hello NC experts!!! i just started seeing these errors under Admin > logging, after i upgraded to 25.0.4

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

I do have plenty space available:

user@nextcloud:~# df -h
Filesystem                         Size  Used Avail Use% Mounted on
tmpfs                              393M  1.1M  392M   1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv  487G   95G  368G  21% /
tmpfs                              2.0G     0  2.0G   0% /dev/shm
tmpfs                              5.0M     0  5.0M   0% /run/lock
/dev/sda2                          2.0G  252M  1.6G  14% /boot
tmpfs                              393M  4.0K  393M   1% /run/user/1001

[/details]

Nextcloud version : 25.0.4
Operating system and version : Ubuntu 22.04
Apache or nginx version : Apache/2.4.52 (Ubuntu)
PHP version : 8.1

The issue you are facing: in Admin Logging, i just noticed lots of Errors: disk_free_space(): No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php

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

Steps to replicate it:

  1. Not sure, i just see this error in Admin > Logging

The output of your Nextcloud log in Admin > Logging:


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

    <<closure>>

    OC\Log\ErrorHandler::onError()

    /var/www/nextcloud/lib/private/Files/Storage/Local.php - line 421:

    disk_free_space()

    /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Quota.php - line 110:

    OC\Files\Storage\Local->free_space()

    /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 334:

    OC\Files\Storage\Wrapper\Quota->free_space()

    /var/www/nextcloud/lib/private/legacy/OC_Helper.php - line 521:

    OC\Files\Storage\Wrapper\Wrapper->free_space()

    /var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php - line 328:

    OC_Helper::getStorageInfo()

    /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 764:

    OCA\DAV\Connector\Sabre\Directory->getQuotaInfo()

    /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/PropFind.php - line 95:

    Sabre\DAV\CorePlugin->Sabre\DAV\{closure}("*** sensiti ... *")

    /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 767:

    Sabre\DAV\PropFind->handle()

    /var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php - line 89:

    Sabre\DAV\CorePlugin->propFind()

    /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 1052:

    Sabre\DAV\Server->emit()

    /var/www/nextcloud/3rdparty/icewind/searchdav/src/DAV/SearchHandler.php - line 183:

    Sabre\DAV\Server->getPropertiesByNode()

    <<closure>>

    SearchDAV\DAV\SearchHandler->getPropertiesIteratorResults()

    /var/www/nextcloud/3rdparty/icewind/searchdav/src/DAV/SearchHandler.php - line 90:

    iterator_to_array()

    /var/www/nextcloud/3rdparty/icewind/searchdav/src/DAV/SearchPlugin.php - line 119:

    SearchDAV\DAV\SearchHandler->handleSearchRequest()

    /var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php - line 89:

    SearchDAV\DAV\SearchPlugin->searchHandler()

    /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 472:

    Sabre\DAV\Server->emit()

    /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 253:

    Sabre\DAV\Server->invokeMethod()

    /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 321:

    Sabre\DAV\Server->start()

    /var/www/nextcloud/apps/dav/lib/Server.php - line 360:

    Sabre\DAV\Server->exec()

    /var/www/nextcloud/apps/dav/appinfo/v2/remote.php - line 35:

    OCA\DAV\Server->exec()

    /var/www/nextcloud/remote.php - line 171:

    require_once("/var/www/ne ... p")


Error	PHP	Error: disk_free_space(): No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#421	
March 04, 2023 09:09:23
Error	PHP	Error: disk_free_space(): No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#421	
March 04, 2023 09:09:23
Error	PHP	Error: disk_free_space(): No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#421	
March 04, 2023 09:09:23
Error	PHP	Error: disk_free_space(): No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#421	
March 04, 2023 09:09:23
Error	PHP	Error: disk_free_space(): No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#421	
March 04, 2023 09:09:23
Error	PHP	Error: disk_free_space(): No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#421	
March 04, 2023 09:09:23
Error	PHP	Error: disk_free_space(): No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#421	
March 04, 2023 09:09:23
Error	PHP	Error: disk_free_space(): No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#421	
March 04, 2023 09:09:23
Error	PHP	Error: disk_free_space(): No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#421	
March 04, 2023 09:09:23
Error	PHP	Error: disk_free_space(): No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#421	
March 04, 2023 09:09:23
Error	PHP	Error: disk_free_space(): No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#421	
March 04, 2023 09:09:23
Error	PHP	Error: disk_free_space(): No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#421	
March 04, 2023 09:09:23

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

<?php
$CONFIG = array (
  'instanceid' => 'ov5z2gs-redacted',
  'passwordsalt' => 'HmEiQsRSXOjfYV0S6m-redacted',
  'secret' => 'FRylR7ml1pTxmafNhRTO2FmpKYowredacted',
  'trusted_domains' =>
  array (
    0 => 'cloud.domain.com',
    1 => 'cloud.domain2.com',
    2 => '192.168.10.10',
    3 => 'cloud.lan',
    4 => 'cloud.local',
    5 => 'nextcloud.domain.com',
  ),
  'datadirectory' => '/var/nextcloud_data',
  'dbtype' => 'mysql',
  'version' => '25.0.4.1',
  'overwrite.cli.url' => 'https://cloud.domain.com',
  'trusted_proxies' =>
  array (
    0 => '172.16.14.2',
  ),
  'dbname' => 'nextcloud_db',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'admin',
  'dbpassword' => 'cl#uXnK2hEtIeF-redacted',
  'installed' => true,
  'filelocking.enabled' => true,
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'trashbin_retention_obligation' => 'auto, 30',
  'versions_retention_obligation' => 'auto, 31',
  'redis' =>
  array (
    'host' => 'localhost',
    'port' => 6379,
  ),
  'twofactor_enforced' => 'true',
  'mysql.utf8mb4' => true,
  'maintenance' => false,
  'mail_from_address' => 'admin',
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'domain.com',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'mail.domain.com',
  'mail_smtpport' => '465',
  'mail_smtpname' => 'admin',
  'mail_smtppassword' => 'lxzppgsipf-redacted',
  'twofactor_enforced_groups' =>
  array (
  ),
  'twofactor_enforced_excluded_groups' =>
  array (
  ),
  'theme' => '',
  'loglevel' => 3,
  'logfile' => '/var/nextcloud_data/nextcloud.log',
  'log_type' => 'file',
  'logdateformat' => 'F d, Y H:i:s',
  'encryption.legacy_format_support' => false,
  'encryption.key_storage_migrated' => false,
  'mail_smtpauthtype' => 'LOGIN',
  'default_phone_region' => 'US',
  'bulkupload.enabled' => false,
  'data-fingerprint' => '49c62b6df6eaf1cc4607f1a-redacted',
);

The output of your Apache/nginx/system log in /var/log/____:

cat /var/log/apache2/error.log
[Sat Mar 04 00:00:01.826615 2023] [mpm_event:notice] [pid 858:tid 139787669510016] AH00489: Apache/2.4.52 (Ubuntu) OpenSSL/3.0.2 configured -- resuming normal operations
[Sat Mar 04 00:00:01.826639 2023] [core:notice] [pid 858:tid 139787669510016] AH00094: Command line: '/usr/sbin/apache2'
[Thu Mar 02 21:31:02.091735 2023] [proxy_fcgi:error] [pid 30537:tid 139988361938496] (70007)The timeout specified has expired: [client 192.168.9.15:62007] AH01075: Error dispatching request to : (reading input brigade)
[Thu Mar 02 21:31:02.218442 2023] [proxy_fcgi:error] [pid 30536:tid 139987697768000] (70007)The timeout specified has expired: [client 192.168.9.15:62019] AH01075: Error dispatching request to : (reading input brigade)
[Thu Mar 02 21:31:02.264152 2023] [proxy_fcgi:error] [pid 30536:tid 139987974596160] (70007)The timeout specified has expired: [client 192.168.9.15:61993] AH01075: Error dispatching request to : (reading input brigade)
[Thu Mar 02 22:34:16.583365 2023] [proxy_fcgi:error] [pid 30536:tid 139987664197184] (70007)The timeout specified has expired: [client 192.168.9.15:62442] AH01075: Error dispatching request to : (reading input brigade)
[Thu Mar 02 22:37:03.020509 2023] [proxy_fcgi:error] [pid 30537:tid 139988403942976] (70008)Partial results are valid but processing is incomplete: [client 192.168.9.15:62453] AH01075: Error dispatching request to : (reading input brigade)
[Fri Mar 03 12:20:56.88276

Any idea how to fix this? not sure if i missed anything

Thanks in advance!

It looks like you have set a quota somewhere that has been reached.

Go to

/index.php/settings/users

and see if any of your users have exhausted their quota.

Thank you ernolf That is not the case, most of users have no quota (unlimited) and few that do are at 10-20%

Is the unexplained log message the only symptom?

I’ve seen this before too but I wasn’t able to correlate it with any other symptoms / causes.

Maybe it’s a regression of this bug:

i’ve seen that one but i thought it was fixed in one of the releases

It seems my logging is not working anymore. I’m not seeing any more logs being written to the log file. Spent few hours trying to fix it and no luck . even if i delete old log file and create new one, its not updating

@nextcloud:/var/www/nextcloud# sudo -u www-data php occ log:manage
Enabled logging backend: file
Log level: Error (3)
Log timezone: America/Los_Angeles

logging settings from config.php

  'theme' => '',
  'loglevel' => 3,
  'logfile' => '/var/nextcloud_data/nextcloud.log',
  'log_type' => 'file',
  'logdateformat' => 'F d, Y H:i:s',
  'log_rotate_size' => 100 * 1024 * 1024,
  'logtimezone' => 'America/Los_Angeles',
@nextcloud:/var/nextcloud_data# ls -ltrh nextcloud.log
-rw-r----- 1 www-data www-data 100M Mar  5 13:07 nextcloud.lo

I’m about to pull my hair out :slight_smile:

Yeah, others thought so too. I’m not so sure, hence: “regression”.

Maybe there aren’t any errors to log. Try increasing the log level to 0 with occ log:manage --level 0.

https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/logging_configuration.html

Doh!! now i feel like a dummy .

That did it Thank you so much!