Occ files:scan completes and removes all files from GUI

NextCloud - 13.0.3
PHP = 2.9.4
Unbuntu - 18.08 LTS
Apache - 2.4.29 - 2018-06-07T21:10:10

i have manually transferred files to a users folder and executed the occ command in the hopes of having those files display in the web gui. however when that command complete all if it was removed all files from the gui with the exception of the shared folders.

sudo -u www-data php occ files:scan username (or)
sudo -u www-data php occ files:scan --all



Was there something other than the command above that needed to executed?


One of these commands should be enough.
What you can do in addition, check the ownership of the newly copied files. When you moved/ copied the files to the Nextcloud data folder, there is a chance they kept the old ownership, which is not www-data. In that case Nextcloud might skip these files, because the file ownership/ permission is not correct or because it just can’t read the files.