I wonder how to duplicate(copy) my files to centOS data folder directly?

In my case, centos7, php7, mariadb, nextcloud 11

I copied my files to linux data folder directly,
but It can’t find or show in the web, app for my data.

Can you help me?

I want to copy directly linux data folder do not through app, web.


If you placed the files in the correct place on the filesystem, then you just need to run the command as the web user:

php occ files:scan --all

Or specific to your user or path, if you don’t want to rescan other user folders. See https://docs.nextcloud.com/server/12/admin_manual/configuration_server/occ_command.html

Thanks very much. I solved this problem.

ex)sudo -u apache php occ files:scan --all

Yea, you need to be in the correct path for occ to work. Or you can include the full path to where occ is, so in a script (using Ubuntu) I would use

sudo -u www-data php /var/www/nextcloud/occ files:scan --all

I’m glad you got it working.