nextcloud / desktop

💻 Desktop sync client for Nextcloud
https://nextcloud.com/install/#install-clients
GNU General Public License v2.0
3k stars 790 forks source link

[Bug]: Directory Symbolic Link _and_ Junction from a Nextcloud share to another Nextcloud share is synced on Windows, with errors #7157

Open Sieboldianus opened 2 weeks ago

Sieboldianus commented 2 weeks ago

⚠️ Before submitting, please verify the following: ⚠️

Bug description

With the latest Nextcloud client on Windows 11, I started seeing upload errors with "unknown" in the client. After inspecting, I traced the errors to a Directory symbolic link I created from a share within my Nextcloud sync folder to another sync folder. I tested with Junctions and saw the same effect.

Steps to reproduce

  1. Create a NTFS Directory symbolic link with mklink /D from a folder that is synced to a Nextcloud server to another folder that is also synced to the same Nextcloud server
    mklink /D C:\Users\user\nc_share1\junction_folder C:\Users\user\Nextcloud\nc_share2\junction_folder_target
    symbolische Verknüpfung erstellt für C:\Users\user\nc_share1\junction_folder <<===>> C:\Users\user\Nextcloud\nc_share2\junction_folder_target

The same applies to Junctions:

mklink /J C:\Users\user\nc_share1\junction_folder C:\Users\user\Nextcloud\nc_share2\junction_folder_target
Verbindung erstellt für C:\Users\user\nc_share1\junction_folder <<===>> C:\Users\user\Nextcloud\nc_share2\junction_folder_target
  1. Observe Nextcloud attempting to upload files again grafik

  2. Observe Nextcloud to fail after scanning files with "Unknown Server error"

grafik

I have both folders as individual shares: grafik

Other observations:

Expected behavior

Directory Junctions are not synced, as is documented.

Which files are affected by this bug

ExpNature1to5.pdf

Operating system

Windows

Which version of the operating system you are running.

Windows 11

Package

Official Windows MSI

Nextcloud Server version

28.0.9

Nextcloud Desktop Client version

4.14.0

Is this bug present after an update or on a fresh install?

Updated from a minor version (ex. 3.4.2 to 3.4.4)

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

Are you using an external user-backend?

Nextcloud Server logs

No response

Additional info

No response

stevehuk commented 1 week ago

I recently saw something that also looks to be related to this issue.

On a windows laptop, "My Documents" and "My Pictures" are synchronised to the sever to separate folders. Since the installation of 3.14.0, the 'My Documents' sync included the standard hidden junctions: "My Music", "My Pictures" and "My Videos". Some files in both "My Music" and "My Pictures" were sent to the server with also some "Unknown server errors" in the log.

When I checked https://github.com/nextcloud/desktop/issues/4770, it describes local junction contents being deleted if they are removed from the sync list so for now I just added the folders to the exclude list.

My investigation was prompted by some performance issues where I saw nextcloud taking more CPU then usual and also being unresponsive whilst opening the drop down list of folders in the sync connection. Reverting to 3.13.4 avoids any performance issues.

I can collect more detailed logs if they would be useful.