Skip to content

Set folders writable if remote perms require it, recurse into subdirs if etag and remoteperms differ #9637

Open
nilsding wants to merge 4 commits intomasterfrom
bugfix/noid/perms
Open

Set folders writable if remote perms require it, recurse into subdirs if etag and remoteperms differ #9637
nilsding wants to merge 4 commits intomasterfrom
bugfix/noid/perms

Conversation

@nilsding
Copy link
Member

Certain remote permissions (CanWrite/CanDelete/CanRename/CanMove) allow contents of a certain folder to be changed. Setting those folders read-only just because the CanAddSubDirectories/CanAddFile permission seems to be the wrong thing to do.

I'm still not sure if serverEntry.remotePerm != dbEntry._remotePerm was intentional, or if it's even necessary to check for that as well; the etag should change if permissions were changed, but this seems to not always be the case (e.g. due to a fixed bug in a storage app).

…ssions

Some of these should not mark the folder as read-only.

Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
…odifiable permissions present

Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
subfolders should also be updated

Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
I'm still not sure if `serverEntry.remotePerm != dbEntry._remotePerm`
was intentional, or if it's even necessary to check for that as well.

The etag should change if permissions were changed, but this is not
always the case (e.g. due to a fixed bug in a storage app).

Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
@nilsding nilsding self-assigned this Mar 17, 2026
@nilsding nilsding added this to the 33.0.0 milestone Mar 17, 2026
@nilsding
Copy link
Member Author

/backport to stable-33.0

@nilsding
Copy link
Member Author

/backport to stable-4.0

@github-actions
Copy link

Artifact containing the AppImage: nextcloud-appimage-pr-9637.zip

Digest: sha256:f5e20fd95ed96e38875755c8f63db291f6c3d137475889fce870dd97f9cccc9c

To test this change/fix you can download the above artifact file, unzip it, and run it.

Please make sure to quit your existing Nextcloud app and backup your data.

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
109 New Code Smells (required ≤ 0)
E Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Windows NextCloud client v4.x - local NTFS rights on shared folder trouble

1 participant