SMB external storage and system folders

Hi there,

I have some kind of strange problem and I can’t find a solution to it. I have a Windows file server that I want to get access to through NextCloud. So I created some external storage entries to get access to some shares like the home directories. This works really good.
The problem I have now, is that some folders are not writable and so you can’t upload or edit files. I found out, that all of these folders have custom icons (like ‘My Music’, etc.). For folders to show icons, Windows requires them to be system folders - internally, at creation time there is a call to an API function called ‘PathMakeSystemFolder’ in ‘shlwapi.dll’. Microsoft API docs
Generally those folders are writable, but somehow the external storage / smbclient does feel different about that. I have already removed all attributes, double-checked permissions, owner, etc. - it must have to do with that ‘system folder’-flag.

What options do I have to solve this? I have googled for days now :frowning:

EDIT:
Ok, I just found out, that removing the ‘readonly’ attribute from the folder is enough. Windows uses this attribute as some kind of marker, but still allows write-access to its content. Unfortunately, this also removes the folder icon. :thinking:

Thanks a lot!
Bruno

1 Like