Issue:
After installing the Windows client and setting up sync, some folders sync and others fail with a specific error:
Unable to open or create the local sync database. Make sure you have write access in the sync folder.
Folders that sync:
Desktop
Downloads
Photos
Folders with sync error:
Documents
Pictures
Is this the first time you’ve seen this error? Y
Steps to replicate it:
Download the Windows client to a Windows 10 1903 x64 laptop (not sure if running in virtual makes any difference)
Install the client
Setup syncing of above folders
All folders started empty on Nextcloud, except Photos that is already synced from mobile phone and had content ahead of testing
No Event Logs errors happen around the same time
I’ve tested installing as admin or as normal user
I’ve tested running as admin or as normal user
I’ve run a Procmon during a test sync and saw no relavent problems
This is an old post, but while running the Windows client 3.13.0, I ran into this same error. I thought I’d share the fix I found in case anyone else comes across this post with this issue.
My setup is simplified. This is a local folder on a non-root local drive, but trying to sync it to my Nextcloud server. I kept getting this same error AFTER the initial sync worked.
I hadn’t changed a thing, except a recent upgrade to the client.
So, after some testing and comparing the permissions with the user’s folder on this drive with those of another folder that did NOT get this same message, it turned out that the upgrade appeared to have randomly inserted a new permissions limitation in the security tab. It literally set DENY to all local users. As soon as I removed this new entry, everything worked swimmingly.
@republicandaddy Thank you so much!!! This completely cured it for me.
It was driving me nuts. I recently did a fresh install of Windows on all of my systems, and two devices had this strange error I couldn’t isolate myself. I even did a complete re-install to start from scratch, but the error returned. I ran Windows Update on all systems, and wonder if that’s the culprit, because as you pointed out, the initial sync did work without any issues.
Here’s a screenshot for further illustration. Why in the world would the security settings for local user folders in Windows be changed so that access is denied? One of the weirdest Windows errors I have come across.
Just came here to note the same issue on Windows 11 that seems to appeared with an update.
In my case it was %userprofile%\Documents in particular. Simply found the deny-all-users permission and removed it and Nextcloud was able to open the sync database again. Thanks to the last few posts.
I wondered if this might be a concern on multi-user systems if Microsoft decided to structure/change permissions that way, but as I’m the only user of my device, I had no reservations with changing it in my case.
Wow, that saved my life.
Since A few days, I was reconnecting and reinstalling Nextcloud clients, without reaching the goal permanently.
I saw that Users-Permission but since the security window is the same fixed size for ages now, so that you have to scroll to the end to see all permissions, I missed that scrolling and did not see that permission denying.
Blame on me, but cheers to you!
Thx a lot!
I encountered an issue with the Nextcloud client on my Windows machine, where it suddenly couldn’t sync my Documents folder due to permissions errors. While I had direct access to the folder, Nextcloud didn’t. When I checked the folder’s permissions, I noticed four groups listed:
System (group)
My Name (user)
Administratoren (machine-name\Administratoren) - group
Benutzer (machine-name\Benutzer) - group
The groups were listed in German, likely because I have a German version of Windows with an English UI. I noticed that the “Benutzer” group had all its permissions unchecked, and special permissions were explicitly denied. After allowing all permissions for the “Benutzer” group (except special permissions), Nextcloud sync started working again.
Interestingly, this problem only started recently, suggesting that something changed these permissions. To verify, I reset the “Benutzer” group’s permissions to their restricted state, and Nextcloud lost access again, confirming that this group is tied to my account somehow, even with admin rights.
After removing the “Benutzer” group from the permissions list altogether, everything worked fine. I’ve seen others on the Nextcloud forum experiencing the same issue, and it seems to correlate with a recent Windows update or possibly a Windows Defender update. It appears these updates might have altered folder permissions, causing the sync problems.
Security Intelligence Update for Microsoft Defender Antivirus - KB2267602 (Version 1.417.333.0) - Current Channel (Broad)
I had this problem, cured it by simply changing where “Documents” pointed to - instead of c:\users<user>\Documents I directed it to c:\users<user>\nextcloud\Documents
Except now Windows has taken it upon itself to apply the “Deny” rule to that folder instead. It is simple enough to resolve but incredibly annoying. A cynic might argue Microsoft is doing it deliberately to break third-party cloud services…
Took a few tries to get this corrected, but it was, indeed, the user permissions w/in Windows. It had built a deny all security entry as USERS (machine name). I modified it to allow all read/write but not takeover permissions. Wonder if I can just delete the USERS permissions. SYSTEM, ADMINISTRATORS, and my account would still be on the system. Thanks for the solution!