Nextcloud "occ files:scan --all" fails

Yes, of course NC runs as www-data.

I don’t see what’s wrong with mounting remote SMB inside NC. The SMB shares are on a private NAS behind a firewall, with a large RAID disk set (a huge collection of professional photos).

NC is on a simple RasPi4 w/ DietPi and reachable from the internet. This has been working splendidly for many years.

I’ll look into the /etc/fstab suggestion you made, but that’s brittle since DietPi adjusts that file.