Why doesn't show photos copied from local storage?

Hi all,
I installed NextCloud two days ago, pretty new to me.
My plan is making the NextCloud replace the Google photo.
Since google photo only uploads photos from phone to the cloud but stopped syncing photo from the cloud to local.
So I copied my existing photos to the nas storage and mounted to the NextCloud. But it doesn’t show up in the system.
Did I miss something to do?


Nextcloud isn’t primarily relying on files in a folder but on related database records. To make sure that files are displayed in the GUI, you might need to scan the content of the directory first. For this purpose the occ command line tool exist. Check-out the following command:

`./occ files:scan ...

Hi @j-ed,
Thanks for your helping.
I tried:

/usr/local/bin/php /usr/local/www/nextcloud/occ file:scan --all

The result is:

The process control (PCNTL) extensions are required in case you want to interrupt long running commands - see PHP: PCNTL - Manual
Your data directory is readable by other users
Please change the permissions to 0770 so that the directory cannot be listed by other users.

An unhandled exception has been thrown:
Exception: Environment not properly prepared. in /usr/local/www/nextcloud/lib/private/Console/Application.php:166
Stack trace:
#0 /usr/local/www/nextcloud/console.php(96): OC\Console\Application->loadCommands(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#1 /usr/local/www/nextcloud/occ(11): require_once(‘/usr/local/www/…’)
#2 {main}

I’m not sure which directory should I change the permissions.

  • To get rid of the first message you should install the missing PCNTL PHP module.
  • To check where your data directory is located, open your Nextcloud configuration (config.php) and look for the parameter datadirectory.
  • To speed-up the scan process I would recommend to make use of the path parameter, e.g.:
    ./occ files:scan --path="/alice/files/Music"
    

Great, I did it.
Thank you so much!