This directory is unavailable, please check the logs or contact the administrator - for one user only?

Nextcloud version (eg, 18.0.2): same error on 17.02 and 18.04
Operating system and version (eg, Ubuntu 20.04): official docker images on a debian host
Apache or nginx version (eg, Apache 2.4.25): official docker images on a debian host
PHP version (eg, 7.1): official docker images on a debian host

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

all other users with the same configuration are fine.

Steps to replicate it:

the user has this error on the home page and doesn’t have anything shown in the main navigator area. he can still click on the different categories on the left, where external storage and activity feed are working correctly. he cannot see or access his own nextcloud files, but clicking on shared files in the activity feed works.

couldn’t find a way to replicate on another user, but the user can access the home page if I disable the external storage plugin, used for db-stored credential smb shares. those shares are accessible through the external storage area of that user without issue when turned on though, so I don’t know what problem they could be causing on the main area…

The output of your Nextcloud log in Admin > Logging:
in the nextcloud container logs, I only have this error that also shows up in the browser logs :

172.20.0.1 - - [05/May/2020:07:56:22 +0000] "PROPFIND /remote.php/dav/files/dff6951e-fc77-1038-8a4b-cf9c6e90a76d/ HTTP/1.0" 500 4496 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36"

dff6951e-fc77-1038-8a4b-cf9c6e90a76d is the user id, created from ldap.

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


<?php
$CONFIG = array (
  'htaccess.RewriteBase' => '/',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 =>
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
  'instanceid' => '',
  'passwordsalt' => '',
  'secret' => '',
  'trusted_domains' =>
  array (
    0 => 'nextcloud.company.com',
    1 => 'nginx-server',
    2 => 'nginx-server',
  ),
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'mysql',
  'version' => '17.0.1.1',
  'overwrite.cli.url' => 'http://nextcloud.company.com',
  'dbname' => 'nextcloud',
  'dbhost' => 'db:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'oc_admin',
  'dbpassword' => '',
  'installed' => true,
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'mail_from_address' => 'utest',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'company.com',
  'mail_smtpauthtype' => 'PLAIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => '',
  'mail_smtpport' => '587',
  'mail_smtpname' => '',
  'mail_smtppassword' => '',
  'mail_smtpsecure' => 'tls',
  'onlyoffice' =>
  array (
    'DocumentServerUrl' => '/ds-vpath/',
    'DocumentServerInternalUrl' => 'http://onlyoffice-document-server/',
    'StorageUrl' => 'http://nginx-server/',
  ),
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
  'trashbin_retention_obligation' => '30, 45',
  'enable_previews' => false,
  'overwriteprotocol' => 'https',
  'app_install_overwrite' =>
  array (
    0 => 'occweb',
  ),
);

I really don’t know where to look. when I try to repair the user with php occ files:scan I encounter this error :

$ php occ files:scan -p dff6951e-fc77-1038-8a4b-cf9c6e90a76d
Starting scan for user 1 out of 1 (dff6951e-fc77-1038-8a4b-cf9c6e90a76d)
An unhandled exception has been thrown:
Error: Call to undefined method OCA\User_LDAP\User\OfflineUser::getExtStorageHome() in /var/www/html/apps/user_ldap/lib/Handler/ExtStorageConfigHandler.php:64
Stack trace:
#0 /var/www/html/apps/files_external/lib/config.php(229): OCA\User_LDAP\Handler\ExtStorageConfigHandler->handle('')
#1 /var/www/html/apps/files_external/lib/Config/ConfigAdapter.php(79): OC_Mount_Config::substitutePlaceholdersInConfig('', '63093020-f044-1...')
#2 /var/www/html/apps/files_external/lib/Config/ConfigAdapter.php(129): OCA\Files_External\Config\ConfigAdapter->prepareStorageConfig(Object(OCA\Files_External\Lib\StorageConfig), Object(OC\User\User))
#3 [internal function]: OCA\Files_External\Config\ConfigAdapter->OCA\Files_External\Config\{closure}(Object(OCA\Files_External\Lib\StorageConfig))
#4 /var/www/html/apps/files_external/lib/Config/ConfigAdapter.php(127): array_map(Object(Closure), Array)
#5 /var/www/html/lib/private/Files/Config/MountProviderCollection.php(103): OCA\Files_External\Config\ConfigAdapter->getMountsForUser(Object(OC\User\User), Object(OC\Files\Storage\StorageFactory))
#6 /var/www/html/lib/private/Files/Filesystem.php(447): OC\Files\Config\MountProviderCollection->addMountForUser(Object(OC\User\User), Object(OC\Files\Mount\Manager))
#7 /var/www/html/apps/files_sharing/lib/SharedStorage.php(127): OC\Files\Filesystem::initMountPoints('63093020-f044-1...')
#8 /var/www/html/apps/files_sharing/lib/SharedStorage.php(482): OCA\Files_Sharing\SharedStorage->init()
#9 /var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php(495): OCA\Files_Sharing\SharedStorage->getWrapperStorage()
#10 /var/www/html/apps/files_sharing/lib/SharedStorage.php(166): OC\Files\Storage\Wrapper\Wrapper->instanceOfStorage('OC\\Files\\Storag...')
#11 /var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php(495): OCA\Files_Sharing\SharedStorage->instanceOfStorage('OC\\Files\\Storag...')
#12 /var/www/html/lib/private/Files/Utils/Scanner.php(200): OC\Files\Storage\Wrapper\Wrapper->instanceOfStorage('OC\\Files\\Storag...')
#13 /var/www/html/apps/files/lib/Command/Scan.php(145): OC\Files\Utils\Scanner->scan('/dff6951e-fc77-...', true, NULL)
#14 /var/www/html/apps/files/lib/Command/Scan.php(201): OCA\Files\Command\Scan->scanFiles('dff6951e-fc77-1...', '/dff6951e-fc77-...', Object(Symfony\Component\Console\Output\ConsoleOutput), false, true, false)
#15 /var/www/html/3rdparty/symfony/console/Command/Command.php(255): OCA\Files\Command\Scan->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 /var/www/html/core/Command/Base.php(166): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#17 /var/www/html/3rdparty/symfony/console/Application.php(908): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 /var/www/html/3rdparty/symfony/console/Application.php(269): Symfony\Component\Console\Application->doRunCommand(Object(OCA\Files\Command\Scan), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 /var/www/html/3rdparty/symfony/console/Application.php(145): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#20 /var/www/html/lib/private/Console/Application.php(213): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#21 /var/www/html/console.php(97): OC\Console\Application->run()
#22 /var/www/html/occ(11): require_once('/var/www/html/c...')
#23 {main}

any help appreciated.

We have had unavailable shares from deleted ldap users hang in the database, this is resolved by deleting old ldap users manually and if needed deleting invalid shares from the database.

I would first upgrade to 18.0.4, it could be a fixed bug.

To see if it is the same issue we have try the following on your server.

sudo -u www-data php occ ldap:show-remnants
sudo -u www-data php occ user:delete uidhere

In the database

select * from oc_share where uid_owner="deleteduseruidhere"

And delete any entry that shows up, be careful :wink:

hm.

ok, this is it.

not deleted but a locked ldap account. his boss left in december and I ldap locked the account not that long ago after moving his main share to another user. he apparently had a specific file shared with this guy left over.

I unlocked the account, changed the password, logged in nextcloud as the boss and the problem disappeared.

good to know, but the behavior is problematic and I don’t understand why the issue would go away if I disable external shares…

thanks for your help!

Ok, great, good to know this happens with locked accounts also.

ah, and upgrading to 18.04 didn’t help - I tried this before creating this thread :slight_smile: