User cannot access directory, error occ files:scan

nc12

#1

Hi,

one of my users cannot access the “Shared” folder in our Nextcloud (12.0.3).
Error Mesasage "
“Dieses Verzeichnis ist nicht verfügbar, bitte überprüfen Sie die Logdateien” (Directory not accessible…)

I tried to do a occ files:scan id, but it fails with the error message:

An unhandled exception has been thrown:
Error: Call to a member function instanceOfStorage() on null in /var/www/nextcloud/lib/private/Files/View.php:1904
Stack trace:
#0 /var/www/nextcloud/lib/private/Files/View.php(2018): OC\Files\View->lockPath(’/Shared’, 1, false)
#1 /var/www/nextcloud/lib/private/Files/View.php(1122): OC\Files\View->lockFile(’/Shared’, 1)
#2 /var/www/nextcloud/lib/private/Files/View.php(269): OC\Files\View->basicOperation(‘mkdir’, ‘/Shared’, Array)
#3 /var/www/nextcloud/apps/files_sharing/lib/Helper.php(259): OC\Files\View->mkdir(’//Shared’)
#4 /var/www/nextcloud/apps/files_sharing/lib/SharedMount.php(92): OCA\Files_Sharing\Helper::getShareFolder(Object(OC\Files\View))
#5 /var/www/nextcloud/apps/files_sharing/lib/SharedMount.php(73): OCA\Files_Sharing\SharedMount->verifyMountPoint(Object(OC\Share20\Share), Array)
#6 /var/www/nextcloud/apps/files_sharing/lib/MountProvider.php(96): OCA\Files_Sharing\SharedMount->__construct(’\OCA\Files_Shar…’, Array, Array, Object(OC\Files\Storage\StorageFactory))
#7 /var/www/nextcloud/lib/private/Files/Config/MountProviderCollection.php(108): OCA\Files_Sharing\MountProvider->getMountsForUser(Object(OC\User\User), Object(OC\Files\Storage\StorageFactory))
#8 /var/www/nextcloud/lib/private/Files/Filesystem.php(445): OC\Files\Config\MountProviderCollection->addMountForUser(Object(OC\User\User), Object(OC\Files\Mount\Manager))
#9 /var/www/nextcloud/apps/files_sharing/lib/SharedStorage.php(117): OC\Files\Filesystem::initMountPoints(‘E61D0352-CE81-4…’)
#10 /var/www/nextcloud/apps/files_sharing/lib/SharedStorage.php(463): OCA\Files_Sharing\SharedStorage->init()
#11 /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php(490): OCA\Files_Sharing\SharedStorage->getWrapperStorage()
#12 /var/www/nextcloud/apps/files_sharing/lib/SharedStorage.php(156): OC\Files\Storage\Wrapper\Wrapper->instanceOfStorage(‘OC\Files\Storag…’)
#13 /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php(490): OCA\Files_Sharing\SharedStorage->instanceOfStorage(‘OC\Files\Storag…’)
#14 /var/www/nextcloud/lib/private/Files/Utils/Scanner.php(197): OC\Files\Storage\Wrapper\Wrapper->instanceOfStorage(‘OC\Files\Storag…’)
#15 /var/www/nextcloud/apps/files/lib/Command/Scan.php(161): OC\Files\Utils\Scanner->scan(’/849A1025-2586-…’)
#16 /var/www/nextcloud/apps/files/lib/Command/Scan.php(234): OCA\Files\Command\Scan->scanFiles(‘849A1025-2586-4…’, ‘/849A1025-2586-…’, true, Object(Symfony\Component\Console\Output\ConsoleOutput), false)
#17 /var/www/nextcloud/3rdparty/symfony/console/Command/Command.php(256): OCA\Files\Command\Scan->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 /var/www/nextcloud/core/Command/Base.php(161): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 /var/www/nextcloud/3rdparty/symfony/console/Application.php(818): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#20 /var/www/nextcloud/3rdparty/symfony/console/Application.php(186): Symfony\Component\Console\Application->doRunCommand(Object(OCA\Files\Command\Scan), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#21 /var/www/nextcloud/3rdparty/symfony/console/Application.php(117): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#22 /var/www/nextcloud/lib/private/Console/Application.php(170): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#23 /var/www/nextcloud/console.php(100): OC\Console\Application->run()
#24 /var/www/nextcloud/occ(11): require_once(’/var/www/nextcl…’)

Any ideas what to do?

Thanks!


#2

Well, after a lot of cloning the Nextcloud VM and tinkering with everthing it seems that an faulty delete attempt of an remnant user was the culprit.:roll_eyes:

It seems that I tried to delete a user in the past and aborted it in the process because it took too long.

After finally deleting the user completly everything worked flawlessly again.

So luck was on my side after all.:grinning:

Cheers.