Two the same folders with the same content

I don’t know how it came about, but in our Nextcloud are two the same folders with the same content.
When I add a document in one folder it also appears in the other folder. Same with editting a document: the changes appears in the same document in the other folder.

How is it possible that such indentical folders are being created?

Can I just delete one of the folders and content without loosing the other?

Hi @PeterBakker

I’m not sure how this can happen… But that’s what I would try to solve the issue…

First of all, look in the data folder on your server whether the folder also exists twice there. If not, try the following:

occ files:cleanup 

and

occ files:scan

https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/occ_command.html#file-operations

If this dosn’t help or the folder also exists twice in the actual file system on the server, backup the folders and make sure that in at least one of them the files have actually content in them, either by looking at the file size or better by opening them. Then delete the folder(s) directly on the server…

rm -r foldername

…after you deleted the folders in the file system of the server, execute the occ commandsocc files:cleanup and files:scan again and make sure that the folders don’t show up in the WebUI anymore. If they disapeared in the WebUI, reupload the folder you backed up before, either via webUI or via sync client.

Hope that helps…

Thanks @bb77,

The folder does not exists twice in the file system on the server.

I indeed did:

occ files:cleanup 

and

occ files:scan --all

Both had nothing to do and both indentical folders are still visible on the Nextcloud-web-screen.

Can a from the server removed folder just be placed back? Will Nextcloud accept this without harm?

Another thaugth:
Has Nextcloud something like shortcuts/symbolic links? In other words: can that extra folder be a shortcut?

Yes. But If you remove or move away a folder directly on the file system on the server, you have to run occ: files-scan again to make nextcloud aware of the changes in the file system. You could of course also try to delete both folders in the webUI of your Nextcloud. Just make sure you have a backup of the folder, either outside of the Nextcloud data folder on your server or outside of the sync folder on your computer.

Not that I know of… Honestley I’m not sure what is causing this. And I never heard of a similiar issue.

At the end it was very simple:
One of our Nextcloud administrators had shared a subfolder to a usergroup that already had a share on the root-folder where the subfolder was in.
Removing the share for that usergroup on the subfolder was all we had to do to get of the double folder.
bb77, thanks for thinking along

1 Like