Cronjob "ncc files:scan --all" not working

In Nextcloud folder not visible in Dietpi and Aria2 wrote the directory nextcloud/documents/mine is visible in all apps, just not on the server, here you mean it is not visible on all apps? I think many things got mixed together with solution and workaround attempts, where most likely permissions of manually created files/dirs were wrong.

Let’s please for now concentrate on assuring that dirs/files created via official apps and web UI are synced between all instances as expected.

Please try to create a custom directory, e.g. named customName via Nextcloud Windows client. Then on the server, search for the location of this dir:

find /mnt/dietpi_userdata/nextcloud_data -type d -name 'customName'

and verify that it gets created on all clients. Only if this works, we can further look into how to download via Aria2 (which was your initial aim?), while I’d always recommend to instead upload via Windows client and skip all the permissions and file index scan hassle on the server.

EDIT: To see error output of the cron job, you need to switch STDOUT and STDERR redirects:

*/1 * * * * php /var/www/nextcloud/occ files:scan --all --verbose >> /tmp/nextcloud_rescan_debug2.log 2>&1

2>&1 needs to come last, if you want STDERR to be redirected to where STDOUT finally goes, i.e. both to be logged into the file. But otherwise great that it works now. Let’s just hope it finally isn’t required but sync works the regular ways :slightly_smiling_face:.