Scan update folders and files

Support intro

Nextcloud version (eg, 20.0.5): Nextcloud 24.0.4
Apache or nginx version (eg, Apache 2.4.25): Nginx 1.20.2
PHP version (eg, 7.4): 7.4.26

Hi,
I’m using Docker to use nextcloud on a server with OMV on it.
I use this image: linuxserver/nextcloud:latest
When I add a file or folder from the explorer (Samba), I have to do a manual synchronization so that my files are seen on Nextcloud with the command:

sudo -u abc php7 -f /config/www/nextcloud/occ files:scan --all

The cron is however well executed every 5min:

*/5     *       *       *       *       s6-setuidgid abc php7 -f /config/www/nextcloud/cron.php

If I run the command below, the scan takes a very long time because it scans the entire tree whereas I would like it to scan only what is new

sudo -u abc php7 -f /config/www/nextcloud/occ files:scan --all

I’ve done a lot of searching and can’t find anything interesting on the subject.

Cordialy,

Why? Why do you use e.g. the Nextcloud Client, WebGUI or WebDAV? Then you do not need files:scan.

You can only scan single users but i think in your case it is no solution.

sudo -u abc php7 -f /config/www/nextcloud/occ files:scan user-id

The WebDav interface does not work because I am using double authentication

Edit: Using an app password it works. Thanks for enlightening me for WebDAv.

1 Like