desktop icon indicating copy to clipboard operation
desktop copied to clipboard

Windows >= 3.2.x: checkPathValidityForNewFolder failes for SMB-folders

Open adlerweb opened this issue 2 years ago • 27 comments

I am using the Windows Desktop Client to sync a folder located on a SMB share to a self hosted nextcloud instance. This worked for Versions up to 3.1.3. Starting with 3.2.0-rc1 (tested up to 3.4.4) a error ("You have no permission to write to the selected folder!") appears when adding a folder synchronization pair. My account has full write permission for the share/folder, creating files using Windows Explorer, Folder Wizard (new folder) or Settings-GUI (save debug logs) works fine. Folders located on local disks work as expected.

Ref: https://help.nextcloud.com/t/you-have-no-permission-to-write-to-the-selected-folder/125486

Expected behaviour

Add writable SMB-folder to sync pair

Actual behaviour

Error You have no permission to write to the selected folder! is displayed while writing should work fine. Next-button is disabled.

Steps to reproduce

  1. Map a NAS drive using SMB ("Windows file share") to a local drive letter (Tested targets: Samba 4.9.x, Windows Server 2012R2, Windows 10)
  2. Install Windows Client 3.2.0 - 3.4.4
  3. Connect to a NC Server
  4. When asked for a local directory browse to the mapped drive, create an empty folder using the NC GUI (aka: prove it is writable) and try to select it

Client configuration

Client version:

  • 3.2.0-rc1 (x64)
  • 3.3.5stable-Win64 (build 20210930); 0d9a6987ebb0040b34451e51f54121dbd339ddf8; Sep 30 2021, 13:30:50; Qt 5.12.10, OpenSSL 1.1.1g 21 Apr 2020
  • (Answers: 3.4.1-3.4.4)

Operating system:

  • Windows 10 Pro
  • Windows 11
  • (Forum: Windows 8.1)

OS language:

  • German
  • English

Installation path of client: Default (C:\Program Files\Nextcloud)

Logs

  1. Client logfile (Win10 German 3.3.5):
2021-10-19 21:34:24:941 [ info nextcloud.gui.folder.manager ]:	Folders to sync: 0
2021-10-19 21:34:24:941 [ info nextcloud.gui.folder.manager ]:	Number of folders that don't use push notifications: 0
2021-10-19 21:34:37:263 [ debug nextcloud.gui.folder.manager ]	[ OCC::FolderMan::checkPathValidityForNewFolder ]:	"d" "Sie haben keine Schreibberechtigung für den ausgewählten Ordner!"
2021-10-19 21:34:37:263 [ debug nextcloud.gui.folder.manager ]	[ OCC::FolderMan::checkPathValidityForNewFolder ]:	"d" "Sie haben keine Schreibberechtigung für den ausgewählten Ordner!"
2021-10-19 21:34:37:264 [ debug nextcloud.gui.folder.manager ]	[ OCC::FolderMan::checkPathValidityForNewFolder ]:	"d" "Sie haben keine Schreibberechtigung für den ausgewählten Ordner!"
2021-10-19 21:34:37:440 [ debug nextcloud.gui.folder.manager ]	[ OCC::FolderMan::checkPathValidityForNewFolder ]:	"d:" "Sie haben keine Schreibberechtigung für den ausgewählten Ordner!"
2021-10-19 21:34:37:666 [ debug nextcloud.gui.folder.manager ]	[ OCC::FolderMan::checkPathValidityForNewFolder ]:	"d:/" "Sie haben keine Schreibberechtigung für den ausgewählten Ordner!"
2021-10-19 21:34:38:317 [ debug nextcloud.gui.folder.manager ]	[ OCC::FolderMan::checkPathValidityForNewFolder ]:	"d:/o" "Sie haben keine Schreibberechtigung für den ausgewählten Ordner!"
2021-10-19 21:34:38:423 [ debug nextcloud.gui.folder.manager ]	[ OCC::FolderMan::checkPathValidityForNewFolder ]:	"d:/ow" "Sie haben keine Schreibberechtigung für den ausgewählten Ordner!"
2021-10-19 21:34:38:643 [ debug nextcloud.gui.folder.manager ]	[ OCC::FolderMan::checkPathValidityForNewFolder ]:	"d:/own" "Sie haben keine Schreibberechtigung für den ausgewählten Ordner!"
2021-10-19 21:34:52:133 [ debug nextcloud.gui.folder.manager ]	[ OCC::FolderMan::checkPathValidityForNewFolder ]:	"D:/Owncloud-Test/test2" "Sie haben keine Schreibberechtigung für den ausgewählten Ordner!"
2021-10-19 21:34:52:208 [ debug nextcloud.gui.folder.manager ]	[ OCC::FolderMan::checkPathValidityForNewFolder ]:	"D:/Owncloud-Test/test2" "Sie haben keine Schreibberechtigung für den ausgewählten Ordner!"
2021-10-19 21:34:52:279 [ debug nextcloud.gui.folder.manager ]	[ OCC::FolderMan::checkPathValidityForNewFolder ]:	"D:/Owncloud-Test/test2" "Sie haben keine Schreibberechtigung für den ausgewählten Ordner!"
2021-10-19 21:34:54:942 [ info nextcloud.gui.folder.manager ]:	Etag poll timer timeout
2021-10-19 21:34:54:942 [ info nextcloud.gui.folder.manager ]:	Folders to sync: 0
2021-10-19 21:34:54:942 [ info nextcloud.gui.folder.manager ]:	Number of folders that don't use push notifications: 0
2021-10-19 21:34:56:244 [ info nextcloud.gui.account.settings ]:	Folder wizard cancelled

adlerweb avatar Oct 19 '21 19:10 adlerweb

Same behaviour if using \\servername\share Syntax instead of a local drive letter.

  • Confirmed this is still an issue on 3.4.1.

RalphGL avatar Oct 20 '21 07:10 RalphGL

I am having the same issue! +1

SpontEIN avatar Oct 20 '21 13:10 SpontEIN

+1

maticjersic avatar Oct 22 '21 14:10 maticjersic

+1

RafaelSz avatar Oct 27 '21 07:10 RafaelSz

+1

fo5Vi7t7yw2L avatar Oct 28 '21 13:10 fo5Vi7t7yw2L

+1 here as well. If I can provide anything to help reproduce, test, or provide info for this, I'm happy to. This is a fairly critical piece of my nextcloud syncing workflow.

Gizmokid2005 avatar Nov 16 '21 02:11 Gizmokid2005

+1

VortexOfLife avatar Nov 23 '21 12:11 VortexOfLife

+1

kxdyz avatar Nov 24 '21 20:11 kxdyz

+1 on Ubuntu 21.10. If there's anything I can provide to assist with fixing this, I'll gladly help.

Antivalent avatar Nov 26 '21 18:11 Antivalent

+1 on Ubuntu 21.10. If there's anything I can provide to assist with fixing this, I'll gladly help.

Could you share how the path is configured? Locally mounted or using a virtual file system like GVFS?

As I guess the problem might be in Qt and not Nextcloud itself it might be worth a shot compiling against a newer or older version of Qt.

adlerweb avatar Nov 26 '21 19:11 adlerweb

I just have it mounted with cifs-utils under /home/my-user/Nextcloud and it wouldn't allow me to configure that path (or any folder within) as my data folder. I was observing this issue in Windows as well, so I assumed the cause was related.

Antivalent avatar Nov 29 '21 22:11 Antivalent

our config: Windows sync client, Network share on a Synology Nas

VortexOfLife avatar Nov 30 '21 10:11 VortexOfLife

+1

ornithophile avatar Dec 17 '21 18:12 ornithophile

image

ornithophile avatar Dec 17 '21 18:12 ornithophile

+1

JohanBraeken avatar Dec 20 '21 11:12 JohanBraeken

Confirmed still an issue on 3.4.1.

ornithophile avatar Dec 24 '21 19:12 ornithophile

I am also seeing this issue trying to sync a file mounted in WSL2. Windows can read/write just fine, but the Nextcloud client detects it as unwritable. (3.4.1)

crestonbunch avatar Jan 01 '22 16:01 crestonbunch

Same here. SMB share from TrueNAS. I'm able to read and write in Windows, but sync client says I don't have permissions. Trying to add sync folders from NFS shares will make the sync client freeze and then crash.

dustbro avatar Jan 06 '22 14:01 dustbro

+1 Also have the same issue. Was able to work around it, by downgrading client to version 3.1.3. Then added the folder synchronisation. Then I immediatly upgraded again to version 3.4.2 and synchronization started.

I use a Synology NAS which I mount in Windows as a drive via Samba

erzedian avatar Feb 04 '22 20:02 erzedian

Here the same and without that SMB is involved.

This problem also exists with a normal Windows share.

Today I wanted to re-set up a machine that previously had the Nextcloud client (Windows) installed as well. The local Nextcloud directory is on a Windows share of another machine - it can be selected, but according to the message there is no write permission. Neither under the mounted drive letter nor under the server path.

But I can otherwise write from the computers as I want and have all access. Only Nextcloud is complaining.

For me, this means that I can no longer set up the synchronization and the desktop client is useless until the problem is solved.

Schneehexe avatar Feb 06 '22 18:02 Schneehexe

Here the same and without that SMB is involved. This problem also exists with a normal Windows share.

Windows shares are using the SMB protocol.

For me, this means that I can no longer set up the synchronization and the desktop client is useless until the problem is solved.

As pointed out you can install an older version and dismiss any popups prompting you to upgrade until the bug is fixed.

adlerweb avatar Feb 06 '22 18:02 adlerweb

same problem ! Trying to sync a mapped NAS-share via mapped drive-letter or UNC-path leads to write-permission-message.

strange: sync with V:\ seemed to work -> V:\data gets the error

istoGer avatar Feb 07 '22 20:02 istoGer

+1

I have a dualboot system with Win10 and opensuse. The same folder sync on opensuse works, on Win10 no.

benems avatar Feb 19 '22 10:02 benems

same Problem with client 3.4.3

Railsimulatornet avatar Mar 19 '22 11:03 Railsimulatornet

+1 Problem still present in 3.4.4

Please don't leave client-breaking bugs open for years. Please. Syncing to a network share CAN'T be an edge case.

cmdrwgls avatar Mar 27 '22 20:03 cmdrwgls

+1 Same problem: SMB-shares won't work. Workaround: select a local directory (e.g. C:\temp\whatever), then close Nextclient, head over to %APPDATA%/Nextcloud and change that path in the nextcloud.cfg file to your SMB-network path (e.g. W:\cloud), start Nextcloud client.

Dennis1000 avatar Mar 28 '22 15:03 Dennis1000

+1

LarsK1 avatar Aug 10 '22 15:08 LarsK1

Another workaround that worked for me: setup Nextcloud client using version 3.1.3, then upgrade to the latest release.

fraenki avatar Aug 14 '22 22:08 fraenki

Issue confirmed

This is really a Nextcloud desktop client bug which seems confirmed by multiple sources and was introduced after 3.1.3.

Some ranting

This is a major issue and I can't believe it's still not fixed after almost a year. I wish I spoke these languages in order to submit a fix... Anyone being a C# / VBS (or whatever language this is) dev here, feel free to submit fixes. Remember that this is open source.

Use case leading to issue

Got a NAS running OpenMediaVault, with a 32TB volume, which includes an SMB share mounted as S:\ in my Windows. I've got to sync a 5TB dir to my Nextcloud instance (80TB available storage server) using a Windows desktop Nextcloud client. There is no way that I store what's on the NAS on a regular Windows desktop as I need to ensure data integrity, high availability, great read speed, and also I want HDD away from my desktop, therefore it's on a Linux NAS in RAID and connected in 10Gbit/s to my Windows while being in another room.

Context for issue

While I previously had this config working, after re-installing Windows (in order to switch from Win10 to Win11), a fresh install wouldn't be able to add it anymore as the client is claiming a permission issue. My SMB permissions seem alright to me as I'm able to create, move, modify files using the file explorer...

Known workarounds

  • Workaround 1: You can temporarily set a wrong dir on a local drive, close Nextcloud, edit config file (in my case in C:\Users[USERNAME]\AppData\Roaming\Nextcloud\nextcloud.cfg) and then change drive location. Might have more issues if your local drive doesn't have enough room for your data on the cloud. If so you'll need to select which dirs to sync first and It'll be alright.
  • Workaround 2: Setup using client 3.1.3 https://github.com/nextcloud/desktop/releases/tag/v3.1.3 I would most likely recommend this, even though I was afraid to try it as I'm now running Windows 11 and wasn't sure if compatibility was alright with an older client. But it's from Feb 18, 2021 so it should be OK.

UltimateByte avatar Sep 26 '22 08:09 UltimateByte

+1

Schroedinger00 avatar Oct 12 '22 23:10 Schroedinger00