# Occ files:scan for user "ABC" shows NO folders & NO files.... and strange results for other users

**URL:** <https://help.nextcloud.com/t/occ-files-scan-for-user-abc-shows-no-folders-no-files-and-strange-results-for-other-users/4006>\
**Category:** ℹ️ Support\
**Created:** [October 9, 2016, 11:27am UTC](https://help.nextcloud.com/t/occ-files-scan-for-user-abc-shows-no-folders-no-files-and-strange-results-for-other-users/4006 "2016-10-09T11:27:22Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![mycloud.os](https://help.nextcloud.com/letter_avatar/mycloud.os/32/6_22734026db12803ebb3e059622ac3534.png) [@mycloud.os](https://help.nextcloud.com/u/mycloud.os)\
**Post date:** [October 9, 2016, 11:27am UTC](https://help.nextcloud.com/t/occ-files-scan-for-user-abc-shows-no-folders-no-files-and-strange-results-for-other-users/4006/1 "2016-10-09T11:27:23Z")

</div>

The above command for my user (ABC) results in no errors, but ZERO Folders & ZERO files & 00:00:00 ElapsedTime  
… although this user owns many files which can be accessed and seen through the webgui… as well most are shared with other users successfully

**any idea how to solve this issue ?** specially as it seems to be connected with my other issue:

> [@Decryption Issues](https://help.nextcloud.com/t/decryption-issues/3948/6):
>
> ADDITIONALLY I just figured that for the specified user (above, ABC), a file scan: php occ files:scan ABC results in 0 Folders / 0 Files / ElapsedTime 00:00:00 !!! But there are for sure a lot of files owned by this user (and beeing shown in the users Folders & WebGui) also a lot beeing successfully shared with other users… Scans for other users show correct files/folders etc… I’M getting more and more LOST…

On the other hand, user “ABC” shared successfully a number of pictures with a GROUP of other users… so all users ot that same group have access to exactly the same amount of pictures !! No user of this GROUP has own pictures or has the right to shatre with other users. Now, when I files:scan for some users oth this GROUP, the results show huge differences with even stranger number counts for example folders… should not instead each scan for each useres of the same group show the same amount of files and folders ???

---

<div class="post-metadata">

**Author:** ![tflidd](https://help.nextcloud.com/letter_avatar/tflidd/32/6_22734026db12803ebb3e059622ac3534.png) [@tflidd](https://help.nextcloud.com/u/tflidd)\
**Post date:** [October 10, 2016, 9:09pm UTC](https://help.nextcloud.com/t/occ-files-scan-for-user-abc-shows-no-folders-no-files-and-strange-results-for-other-users/4006/2 "2016-10-10T21:09:34Z")

</div>

- Make sure that you run a current version of nextcloud ([https://nextcloud.com/changelog/#latest10](https://nextcloud.com/changelog/#latest10) or [https://nextcloud.com/changelog/#latest9](https://nextcloud.com/changelog/#latest9)).
- Check your logfile
- add to the occ-command `-vvv` in order to show potential errors.
- Is this local storage or external?

---

<div class="post-metadata">

**Author:** ![mycloud.os](https://help.nextcloud.com/letter_avatar/mycloud.os/32/6_22734026db12803ebb3e059622ac3534.png) [@mycloud.os](https://help.nextcloud.com/u/mycloud.os)\
**Post date:** [October 11, 2016, 11:50am UTC](https://help.nextcloud.com/t/occ-files-scan-for-user-abc-shows-no-folders-no-files-and-strange-results-for-other-users/4006/3 "2016-10-11T11:50:47Z")

</div>

**ON NC 9.0.54 the following happens (NO Lockfile Errors!!) :**

ssh-w000000c@xxxxxx:/www/htdocs/w000000c/wwwcloud/mycloud$ **php occ -vvv files:scan ABC**  
The process control (PCNTL) extensions are required in case you want to interrupt long running commands - see [http://php.net/manual/en/book.pcntl.php](http://php.net/manual/en/book.pcntl.php)

Starting scan for user 1 out of 1 (ABC)

±--------±------±-------------+  
| Folders | Files | Elapsed time |  
±--------±------±-------------+  
| 0 | 0 | 00:00:00 |  
±--------±------±-------------+

#-------------------------------------

**AFTER UPGRADE to 10.0.1:**  
LogFileError:  
{“reqId”:“V-wW71UNiDMAAByDGnUAAAAC”,“remoteAddr”:“91.52.129.135”,“app”:“PHP”,“message”:“Error: Class ‘OC\Files\Cache\SharedScanner’ not found at /www/htdocs/w000000c/xxxxxx/mycloud/apps/files\_sharing/lib/sharedstorage.php#596”,“level”:3,“time”:“2016-10-11T01:43:41+02:00”,“method”:“POST”,“url”:"/index.php/apps/encryption/ajax/userSetRecovery",“user”:“ABC”}

**PLUS, when I do occ files:scan ABC:**

ssh-w005850c@xxxxxxxx:/www/htdocs/w000000c/xxxxxx//mycloud$ **php occ -vvv files:scan o815**  
The process control (PCNTL) extensions are required in case you want to interrupt long running commands - see [http://php.net/manual/en/book.pcntl.php](http://php.net/manual/en/book.pcntl.php)

Starting scan for user 1 out of 1 (o815)  
Exception while scanning: “files/ddc0750b4786834e4e4293e0d783d01b” is locked  
"#0 /www/htdocs/w000000c/xxxxxx//mycloud/lib/private/Files/Storage/Common.php(651): OC\Lock\DBLockingProvider-\>acquireLock(‘files/ddc0750b4…’, 2)  
"#1 /www/htdocs/w000000c/xxxxxx/mycloud/lib/private/Files/Storage/Wrapper/Wrapper.php(584): OC\Files\Storage\Common-\>acquireLock(‘scanner::’, 2, Object(OC\Lock\DBLockingProvider))  
"#2 /www/htdocs/w000000c/xxxxxx//mycloud/lib/private/Files/Cache/Scanner.php(306): OC\Files\Storage\Wrapper"\Wrapper-\>acquireLock(‘scanner::’, 2, Object(OC\Lock\DBLockingProvider))  
"#3 /www/htdocs/w000000c/xxxxxx//mycloud/lib/private/Files/Utils/Scanner.php(196): OC\Files\Cache\Scanner-\>scan(’’, true, 3)  
"#4 /www/htdocs/w000000c/xxxxxx//mycloud/apps/files/lib/Command/Scan.php(159): OC\Files\Utils\Scanner-\>scan(’/o815’)  
"#5 /www/htdocs/w000000c/xxxxxx//mycloud/apps/files/lib/Command/Scan.php(227): OCA\Files\Command\Scan-\>scanFiles(‘o815’, ‘/o815’, true, Object(Symfony\Component\Console\Output\ConsoleOutput), false)  
"#6 /www/htdocs/w000000c/xxxxxx//mycloud/3rdparty/symfony/console/Command/Command.php(259): OCA\Files\Command\Scan-\>execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))  
"#7 /www/htdocs/w000000c/xxxxxx//mycloud/core/Command/Base.php(159): Symfony\Component\Console\Command\Command-\>run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))  
"#8 /www/htdocs/w000000c/xxxxxx//mycloud/3rdparty/symfony/console/Application.php(844): OC\Core\Command\Base-\>run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))  
"#9 /www/htdocs/w000000c/xxxxxx//mycloud/3rdparty/symfony/console/Application.php(192): Symfony\Component\Console\Application-\>doRunCommand(Object(OCA\Files\Command\Scan), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))  
"#10 /www/htdocs/w000000c/xxxxxx//mycloud/3rdparty/symfony/console/Application.php(123): Symfony\Component\Console\Application-\>doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))  
"#11 /www/htdocs/w000000c/xxxxxx//mycloud/lib/private/Console/Application.php(146): Symfony\Component\Console\Application-\>run(NULL, NULL)  
"#12 /www/htdocs/w005850c/wwwcloud/mycloud/console.php(90): OC\Console\Application-\>run()  
"#13 /www/htdocs/w000000c/xxxxxx/mycloud/occ(11): require\_once(’/www/htdocs/w00…’)  
"#14 {main}

±--------±------±-------------+  
| Folders | Files | Elapsed time |  
±--------±------±-------------+  
| 0 | 0 | 00:00:00 |  
±--------±------±-------------+

---

<div class="post-metadata">

**Author:** ![tflidd](https://help.nextcloud.com/letter_avatar/tflidd/32/6_22734026db12803ebb3e059622ac3534.png) [@tflidd](https://help.nextcloud.com/u/tflidd)\
**Post date:** [October 11, 2016, 11:56am UTC](https://help.nextcloud.com/t/occ-files-scan-for-user-abc-shows-no-folders-no-files-and-strange-results-for-other-users/4006/4 "2016-10-11T11:56:01Z")

</div>

Do you use redis for the file-locking? especially on large setups and with many file operations you should use this.

On your admin page, does your integrity test fail?

---

<div class="post-metadata">

**Author:** ![mycloud.os](https://help.nextcloud.com/letter_avatar/mycloud.os/32/6_22734026db12803ebb3e059622ac3534.png) [@mycloud.os](https://help.nextcloud.com/u/mycloud.os)\
**Post date:** [October 11, 2016, 12:21pm UTC](https://help.nextcloud.com/t/occ-files-scan-for-user-abc-shows-no-folders-no-files-and-strange-results-for-other-users/4006/5 "2016-10-11T12:21:18Z")

</div>

**redis ?? file locking ?? sorry didn’t do anything except for what I wrote…**  
no idea how I could lock or unlock files… :-/

NC is running on a hosted webserver (ALL-INKL)

Integrity test is not failing… BUT I get the following warning:  
Webserver not sufficiently configured for synchronization…

“Sicherheits- & Einrichtungswarnungen: Ihr Webserver ist noch nicht hinreichend für  
Datei-Synchronisation konfiguriert, weil die WebDAV-Schnittstelle  
vermutlich nicht funktioniert.”

---

<div class="post-metadata">

**Author:** ![tflidd](https://help.nextcloud.com/letter_avatar/tflidd/32/6_22734026db12803ebb3e059622ac3534.png) [@tflidd](https://help.nextcloud.com/u/tflidd)\
**Post date:** [October 11, 2016, 1:49pm UTC](https://help.nextcloud.com/t/occ-files-scan-for-user-abc-shows-no-folders-no-files-and-strange-results-for-other-users/4006/6 "2016-10-11T13:49:30Z")

</div>

See in the documentation:  
[https://docs.nextcloud.com/server/10/admin\_manual/configuration\_server/security\_setup\_warnings.html#your-web-server-is-not-yet-set-up-properly-to-allow-file-synchronization](https://docs.nextcloud.com/server/10/admin_manual/configuration_server/security_setup_warnings.html#your-web-server-is-not-yet-set-up-properly-to-allow-file-synchronization)

But without access to the server it is hard to debug this and even if you manage to do it, you probably can’t change it. I know some people run owncloud at all-inkl in the past but I don’t know if they had this problem. Perhaps check the hosting-sections in the old and new owncloud forum as well.  
It could be that the webserver has his own webdav implementation enabled, perhaps you can disable it somewhere.

Just to double check, can you connect to [demo.nextcloud.com](http://demo.nextcloud.com) with your webdav client?

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [November 6, 2024, 8:52pm UTC](https://help.nextcloud.com/t/occ-files-scan-for-user-abc-shows-no-folders-no-files-and-strange-results-for-other-users/4006/7 "2024-11-06T20:52:27Z")

</div>

wwe: close old topics

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [January 24, 2025, 6:26pm UTC](https://help.nextcloud.com/t/occ-files-scan-for-user-abc-shows-no-folders-no-files-and-strange-results-for-other-users/4006/8 "2025-01-24T18:26:11Z")

</div>


