Skip to content

Conversation

@nilsding
Copy link
Member

@nilsding nilsding commented Dec 1, 2025

apparently SetFileSecurity did not propagate ACLs, unlike its "new" replacement SetSecurityInfo/SetNamedSecurityInfo.

SetSecurityInfo should not perform the propagation if the handle is opened with an access mask value of MAXIMUM_ALLOWED, so let's give that a try.

also removed the restriction on the FILE_WRITE_ATTRIBUTES permission so that FileSystem::setFileReadOnly has an easier time modifying the basic attribute

@nilsding
Copy link
Member Author

nilsding commented Dec 1, 2025

/backport to stable-4.0

apparently `SetFileSecurity` did not do that, unlike its "new" (since
Windows 2000) replacement `SetSecurityInfo`/`SetNamedSecurityInfo`.

[`SetSecurityInfo` should not perform the propagation if the handle is
opened with an access mask value of `MAXIMUM_ALLOWED`][0], so let's give
that a try.

also removed the restriction on the FILE_WRITE_ATTRIBUTES permission so
that `FileSystem::setFileReadOnly` has an easier time modifying the
basic attribute

[0]: https://learn.microsoft.com/en-us/windows/win32/api/aclapi/nf-aclapi-setsecurityinfo#:~:text=MAXIMUM_ALLOWED

Fixes #9136

Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
@mgallien mgallien force-pushed the bugfix/9136/noninheritable-perms branch from 65f1e6f to 102238d Compare December 1, 2025 14:22
@mgallien mgallien enabled auto-merge December 1, 2025 14:23
@github-actions
Copy link

github-actions bot commented Dec 1, 2025

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

Digest: sha256:1ec5535c20b4814511086c11d54d7d871c287e711dd5aeb214f5f05776315c99

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.

@mgallien mgallien merged commit a56b766 into master Dec 1, 2025
20 checks passed
@mgallien mgallien deleted the bugfix/9136/noninheritable-perms branch December 1, 2025 15:00
@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 1, 2025

Quality Gate Failed Quality Gate failed

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

See analysis details on SonarQube Cloud

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

@nilsding nilsding linked an issue Dec 2, 2025 that may be closed by this pull request
8 tasks
@nilsding nilsding modified the milestones: 4.0.3, 4.1.0 Dec 3, 2025
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]: Desktop client windows 4.0.2 freeze file explorer

3 participants