Android App does not show all files


I`m using the Android app to access file on 16.0.3.
A folder on my server is connected to NC as external FTP.
My Scanner uploads scans to this folder with ftp.

To see these files in nextcloud I`m running “occ files:scan user” every 5 minutes as a cronjob.

This worked like a charm but without having changed anything, neither on NC, Android App I can`t see this files. Tested on Smartphone and Tablet. Both Android. They are also not visible in the Web GUI

I can see the files in the FTP client. Everything fine.

Any ideas?


Hi hokaido!

There are some things that I would try.

Make sure that the folder is placed correctly in your nextcloud datafolder .../<your data folder>/<your user>/files/<the folder> and that you scan the right user.

Also you could try to scan all users: occ files:scan --all

Or try to scan the files manually (not as a cronjob); to see if it throws any errors.

I did not change anything before, just updated some apps in the web gui some days before.
Tried it manually in the occ web GUI:

Exception during scan: “files/886000956caf65548b216aa2a4522ac9” is locked

#0 /var/www/vhosts/ OC\Lock\DBLockingProvider->acquireLock('files/886000956…

.’, 1)

#1 /var/www/vhosts/ OC\Files\Storage\Common->acquireLock('files/Zeitun

gen…’, 1, Object(OC\Lock\DBLockingProvider))

#2 /var/www/vhosts/ OC\Files\Storage\Wrapper\Wrapper->acquireLock('files/Zeitung

en…’, 1, Object(OC\Lock\DBLockingProvider))

#3 /var/www/vhosts/ OC\Files\Cache\Scanner->scanFile(‘files/Zeitungen…’, 3, '2

472’, Object(OC\Files\Cache\CacheEntry), true)

#4 /var/www/vhosts/ OC\Files\Cache\Scanner->handleChildren(‘files/Zeitungen’, tr

ue, 3, ‘2472’, true, 1713194583)

#5 /var/www/vhosts/ OC\Files\Cache\Scanner->scanChildren(‘files/Zeitungen’, true

, 3, ‘2472’, true)

#6 /var/www/vhosts/ OC\Files\Cache\Scanner->scanChildren(‘files’, true, 3, ‘586’

, true)

#7 /var/www/vhosts/ OC\Files\Cache\Scanner->scanChildren(’’, true, 3, ‘584’, tru


#8 /var/www/vhosts/ OC\Files\Cache\Scanner->scan(’’, true, 3)

#9 /var/www/vhosts/ OC\Files\Utils\Scanner->scan(’/SAMPLE-USER’, true, NULL)

#10 /var/www/vhosts/ OCA\Files\Command\Scan->scanFiles(‘SAMPLE-USER’, ‘/SAMPLE-USER’

, Object(OCA\OCCWeb\Controller\OccOutput), false, true, false)

#11 /var/www/vhosts/ OCA\Files\Command\Scan->execute(Object(Symfony\Com

ponent\Console\Input\StringInput), Object(OCA\OCCWeb\Controller\OccOutput))

#12 /var/www/vhosts/ Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\C

onsole\Input\StringInput), Object(OCA\OCCWeb\Controller\OccOutput))

#13 /var/www/vhosts/ OC\Core\Command\Base->run(Object(Symfony\Component\Con

sole\Input\StringInput), Object(OCA\OCCWeb\Controller\OccOutput))

#14 /var/www/vhosts/ Symfony\Component\Console\Application->doRunCommand(Ob

ject(OCA\Files\Command\Scan), Object(Symfony\Component\Console\Input\StringInput), Object(OCA\OCCWeb\Controller\OccOutput))

#15 /var/www/vhosts/ Symfony\Component\Console\Application->doRun(Object(Sy

mfony\Component\Console\Input\StringInput), Object(OCA\OCCWeb\Controller\OccOutput))

#16 /var/www/vhosts/ Symfony\Component\Console\Application->run(Object

(Symfony\Component\Console\Input\StringInput), Object(OCA\OCCWeb\Controller\OccOutput))

#17 /var/www/vhosts/ OCA\OCCWeb\Controller\OCCApplication->run(Object(Sy

mfony\Component\Console\Input\StringInput), Object(OCA\OCCWeb\Controller\OccOutput))

#18 /var/www/vhosts/ OCA\OCCWeb\Controller\OccController->run(Object(Sym


#19 /var/www/vhosts/ OCA\OCCWeb\Controller\OccController->cmd('files:sc

an chri…’)

#20 /var/www/vhosts/ OC\AppFramework\Http\Dispatcher->executeController(

Object(OCA\OCCWeb\Controller\OccController), ‘cmd’)

#21 /var/www/vhosts/ OC\AppFramework\Http\Dispatcher->dispatch(Object(OCA\OCCWeb\Co

ntroller\OccController), ‘cmd’)

#22 /var/www/vhosts/ OC\AppFramework\App::main('OCA\OCCWeb\

Cont…’, ‘cmd’, Object(OC\AppFramework\DependencyInjection\DIContainer), Array)

#23 [internal function: OC\AppFramework\Routing\RouteActionHandler->__invoke(Array)

#24 /var/www/vhosts/ call_user_func(Object(OC\AppFramework\Routing\RouteActionHandler),


#25 /var/www/vhosts/ OC\Route\Router->match(’/apps/occweb/cm…’)

#26 /var/www/vhosts/ OC::handleRequest()

#27 {main}]

How do you run occ?
I have understood that the proper way is to run occ in the root of nextcloud:
sudo -u www-data php occ files:scan --all

Could you show the server log here (settings => logging)?

And could you also run ls -lah in the “files” folder: sudo ls -lah .../<your datafolder>/<your user>/files to know if the permissions are right

Seems that the cron job is not running properly. If i start the cron manually it works. Will update Nextcloud the next day to see if the problem is till there