Nextcloud Linux client sync fails after directly copying files to data folder

Dear community,

I am running a fresh install of NextcloudPi on a Raspberry Pi 3 with an external drive for my data folder. All is working well for the most part.

In order to get synching going without the cumbersome transfer of large amounts of data over the network, I detached my Nextcloud storage from my Raspberry Pi and attached it to my computer. I proceeded to move data directly into the ncdata/myuser folder on my external storage. After plugging the external storage back into the Raspberry Pi and booting up Nextcloud, I SSH’ed to the instance and did chown -R www-data:www-data on the folders I moved manually. I then proceeded to do sudo ncp-fix-permissions and sudo ncp-scan which all ran as expected.

From the Nextcloud client on my Linux machine I now set up the sync folders. All folders, except my photos folder, scanned smoothly and said all was synched without downloading any files. My photos folder on the other hand did not seem to reach the same conclusion that folders already have the exact same content, and thus proceeded to download all the photos from the cloud. From the client, going to Activity -> Sync Protocol, I can see that the client starts downloading all the photos (~50 GB in total), and under the Action column it reads Server version downloaded, copied changed local file into conflict file.

Any help as to why this is happening? I’ve checked after copying that the photos folders contain exactly the same files.

Any help is much appreciated!

Hi @mmlauridsen, could you please test the occ command “files:scan” at least for the folder/user “myuser”?

Check manual for that: “

Command would be “sudo -u www-data php occ files:scan myuser” (“myuser” might to be replaced).