nextcloud / desktop

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

[Bug]: Selecting library in Windows in sync messes up permissions #6989

Open BjGoCraft opened 3 months ago

BjGoCraft commented 3 months ago

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

Bug description

I added a new folder synchronization and choose a Windows library (e.g. Music library) as the local folder and some random folder on the server as the server folder. Then it first synchronized right. After I found out I want to have a different folder structure, I deleted the folder synchronization. Now the local folder (Music library) is in a locked down mode: I and no other program can write to that library, we can't add a new folder in that library (you need Admin permission that I have, but still doesn't work) and the library can't be deleted. You also can't add the Music library as a local folder after that (no permissions). I tried many things to troubleshoot this on the Windows side of things (tried giving permissions to everyone, tried recreating libraries, etc.) but nothing worked. I also uninstalled the Nextcloud client but that didn't help either. I guess the Nextcloud client messes up the permissions of a library if you select it as a local folder on folder sync. Screenshot_(1) This screenshot shows the dialog you get when right clicking in the Music library and clicking "New" > "Folder"

Steps to reproduce

  1. Add new folder synchronization in desktop client under Windows 10
  2. Select a Windows library (e.g. Music library) as the local folder
  3. Select any folder on the Server
  4. Choose not to use virtual files, but to download them to the client
  5. Let it synchronize the files
  6. Delete this folder synchronization again
  7. Library folder should be locked down now (can't create folder inside it)

Expected behavior

The library should be accessible like before if you remove folder synchronization.

Which files are affected by this bug

There are no files directly affected

Operating system

Windows

Which version of the operating system you are running.

Windows 10

Package

Other

Nextcloud Server version

27.1.10

Nextcloud Desktop Client version

3.13.2

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

Fresh desktop client install

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

Are you using an external user-backend?

Nextcloud Server logs

no access to logs as it is a managed Nextcloud instance, but this should be a client issue

Additional info

Please don't try to reproduce it on your main Windows PC as I didn't find a way to clean it up again.

catgirlcataclysm commented 1 month ago

I had this exact same problem, as nearly all of my nextcloud synced folders are libraries (Documents, Music, Videos, etc.).

Windows 11 - NC Desktop 3.13.3 NC Server 29.0.4

catgirlcataclysm commented 1 month ago

I had this exact same problem, as nearly all of my nextcloud synced folders are libraries (Documents, Music, Videos, etc.).

Windows 11 - NC Desktop 3.13.3 NC Server 29.0.4

though I just read through the changelog of 3.14.0, and it seems like it may be fixed, I'm going to test it in a VM

catgirlcataclysm commented 1 month ago

I had this exact same problem, as nearly all of my nextcloud synced folders are libraries (Documents, Music, Videos, etc.). Windows 11 - NC Desktop 3.13.3 NC Server 29.0.4

though I just read through the changelog of 3.14.0, and it seems like it may be fixed, I'm going to test it in a VM

yup, I'm still seeing the same issue {A1B1BE5F-756C-4798-A3D8-67254E20255D}

RobertSmits commented 2 days ago

I've encountered the same issue multiple times on my laptop, and now it's happening on my desktop for the first time. On my desktop, I use a Nextcloud folder under my user profile, so it doesn’t seem to be directly related to Windows library folders.

I'm currently running Nextcloud client version 3.14.3.

The permission issue itself is straightforward to fix. There’s an additional “Deny” permission for the Users group on the sync folder, which overrides the “Allow” permissions set for your own user. To resolve this, follow these steps:

Right-click your sync folder, select Properties, then go to the Security tab.
Click Advanced to open the advanced permissions settings.
Find the entry for the Users group and remove it.

This will clear the Deny permission rule for the Users group, allowing Nextcloud to sync without further permission issues.

RobertSmits commented 2 days ago

7100 Is a duplicate of this issue