Home folder is not visible and shows error: This directory is unavailable, please check the logs or contact the administrator

Support intro
TypeError: Argument 1 passed to OC\Files\Mount\Manager::findByStorageId() must be of the type string, null given, called in /var/www/html/nextcloud/lib/private/Files/Mount/Manager.php on line 185

    /var/www/html/nextcloud/lib/private/Files/Mount/Manager.php - line 185:

    OC\Files\Mount\Manager->findByStorageId(null)

    

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version : 22.2.0
Operating system and version : Centos 7 x86_64
Apache or nginx version : Apache 2.4.6-97
PHP version : 7.4.24

The issue you are facing:

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Update to 22.2.0 via web interface
  2. Log as some user except admin
  3. Menu → Files
    Got error: “This directory is unavailable, please check the logs or contact the administrator”
    User’s home folder in not visible
  4. Log as admin, his directory is available
  5. After disabling app “File sharing” is user’s directory available

The output of your Nextcloud log in Admin > Logging:

TypeError: Argument 1 passed to OC\Files\Mount\Manager::findByStorageId() must be of the type string, null given, called in /var/www/html/nextcloud/lib/private/Files/Mount/Manager.php on line 185

    /var/www/html/nextcloud/lib/private/Files/Mount/Manager.php - line 185:

    OC\Files\Mount\Manager->findByStorageId(null)

    /var/www/html/nextcloud/apps/files_sharing/lib/SharedStorage.php - line 416:

    OC\Files\Mount\Manager->findByNumericId(115)

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

    OCA\Files_Sharing\SharedStorage->getWatcher("", OCA\Files_Tr ... l})

    /var/www/html/nextcloud/lib/private/Files/View.php - line 1339:

    OC\Files\Storage\Wrapper\Wrapper->getWatcher("")

    /var/www/html/nextcloud/lib/private/Files/View.php - line 1393:

    OC\Files\View->getCacheEntry(OCA\Files_Tr ... l}, "", "//sk")

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

    OC\Files\View->getFileInfo("/lukas_h/files/sk")

    /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php - line 78:

    OCA\DAV\Connector\Sabre\Directory->getChild("sk")

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

    Sabre\DAV\Tree->getNodeForPath("files/lukas_h/sk")

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

    Sabre\DAV\Server->getPropertiesIteratorForPath("files/lukas_h/sk", [ "{DAV:}res ... "], 1)

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

    Sabre\DAV\Server->writeMultiStatus(Sabre\Xml\Wr ... }}, Generator {}, false)

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

    Sabre\DAV\Server->generateMultiStatus(Generator {}, false)

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

    Sabre\DAV\CorePlugin->httpPropFind(Sabre\HTTP\Request {}, Sabre\HTTP\Response {})

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

    Sabre\DAV\Server->emit("method:PROPFIND", [ Sabre\HTTP ... }])

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

    Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Request {}, Sabre\HTTP\Response {})

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

    Sabre\DAV\Server->start()

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

    Sabre\DAV\Server->exec()

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

    OCA\DAV\Server->exec()

    /var/www/html/nextcloud/remote.php - line 166:

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

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

<?php
$CONFIG = array (
  'config_is_read_only' => false,
  'updatechecker' => false,
  'trusted_domains' => 
  array (
    0 => '192.168.168.88',
 
  ),
  'datadirectory' => '/var/spool/owncloud/data',
  'default_phone_region' => 'CZ',
  'overwrite.cli.url' => 'https://192.168.168.88/owncloud',
  'overwriteprotocol' => 'https',
  'dbtype' => 'mysql',
  'version' => '22.2.0.2',
  'dbname' => 'ownclouduser',
  'dbhost' => 'localhost',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'ownclouduser',
  'dbpassword' => 'xxxxxxxxxxxxx',
  'logtimezone' => 'UTC',
  'installed' => true,
  'mail_smtpmode' => 'smtp',
  'mail_from_address' => 'owc',
  'mail_domain' => 'mail.example.com',
  'mail_smtphost' => '192.168.115.200',
  'mail_smtpport' => '25',
  'appstore.experimental.enabled' => true,
  'maintenance' => false,
  'loglevel' => 1,
  'preview_libreoffice_path' => '/usr/bin/libreoffice',
  'instanceid' => 'ocgmc0e8ff7u',
  'singleuser' => false,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'redis' => 
  array (
    'host' => 'localhost',
    'port' => 6379,
    'timeout' => 0,
    'password' => '',
    'dbindex' => 0,
  ),
  'filelocking.enabled' => true,
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'has_rebuilt_cache' => true,
  'mysql.utf8mb4' => true,
  'updater.release.channel' => 'stable',
  'theme' => '',
  'quota_include_external_storage' => false,
);

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


Apache error log:
[Fri Oct 15 12:20:06.509755 2021] [core:notice] [pid 6736] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
[Fri Oct 15 12:20:06.510652 2021] [suexec:notice] [pid 6736] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri Oct 15 12:20:06.536055 2021] [lbmethod_heartbeat:notice] [pid 6736] AH02282: No slotmem from mod_heartmonitor
[Fri Oct 15 12:20:06.568188 2021] [mpm_prefork:notice] [pid 6736] AH00163: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.24 configured -- resuming normal operations
[Fri Oct 15 12:20:06.568204 2021] [core:notice] [pid 6736] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'

Apache ssl_access log
192.168.201.80 - lukas_h [16/Oct/2021:20:35:46 +0200] "PROPFIND /owncloud/remote.php/dav/files/lukas_h/ HTTP/1.1" 207 250
192.168.201.80 - lukas_h [16/Oct/2021:20:35:46 +0200] "PROPFIND /owncloud/remote.php/dav/files/lukas_h/ HTTP/1.1" 207 256
192.168.201.80 - lukas_h [16/Oct/2021:20:36:16 +0200] "PROPFIND /owncloud/remote.php/dav/files/lukas_h/ HTTP/1.1" 207 256

Check the permissions of the folder /var/spool/owncloud/data// and its subfolders/files
Should be www-data www-data

Thank you,
in my centos is owner of /var/spool/owncloud/data/ apache:apache, because http server runs as apache user. Ownership and usermod are O.K.

Subfolders of user home directory e.g. user/Documents are normally accessible without any error.

Nextcloud clients works normally, synchronization works.

problem seems to be fixed :slight_smile:

occ files:cleanup
occ files:scan --all