Add list capabilities to directories for interactive users#12189
Merged
michalpristas merged 11 commits intoelastic:mainfrom Jan 26, 2026
Merged
Add list capabilities to directories for interactive users#12189michalpristas merged 11 commits intoelastic:mainfrom
michalpristas merged 11 commits intoelastic:mainfrom
Conversation
Contributor
|
This pull request does not have a backport label. Could you fix it @michalpristas? 🙏
|
Member
|
@michalpristas how backport friendly is this fix? It'd be nice to have a fix land in past versions, if possible. |
Contributor
Author
|
Should not be an issue. Let's do backport active and close prs that turns out problematic |
cmacknz
reviewed
Jan 21, 2026
Member
|
I am fine with this as the current best path we have to stop this problem from happening, I do this we need to document it a bit more. |
blakerouse
reviewed
Jan 22, 2026
Contributor
blakerouse
left a comment
There was a problem hiding this comment.
Nice, this is a really smart idea for this.
This PR has an updated beats submodule, did you mean for that?
Contributor
Author
|
no i just hate submodules |
Contributor
💛 Build succeeded, but was flaky
Failed CI StepsHistory
|
cmacknz
approved these changes
Jan 23, 2026
Contributor
|
@Mergifyio backport 8.19 9.2 9.3 |
Contributor
✅ Backports have been createdDetails
|
mergify bot
pushed a commit
that referenced
this pull request
Jan 26, 2026
* Add list capabilities to directories for interactive users * changelog * changelog * make test failures clear * make test failures clear * updated changelog * beats (cherry picked from commit 158d0d4)
mergify bot
pushed a commit
that referenced
this pull request
Jan 26, 2026
* Add list capabilities to directories for interactive users * changelog * changelog * make test failures clear * make test failures clear * updated changelog * beats (cherry picked from commit 158d0d4)
mergify bot
pushed a commit
that referenced
this pull request
Jan 26, 2026
* Add list capabilities to directories for interactive users * changelog * changelog * make test failures clear * make test failures clear * updated changelog * beats (cherry picked from commit 158d0d4)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR addresses a failure case where OSQuery breaks due to invalid permissions on the Extensions directory.
Per the OSQuery implementation, permissions on the directory are validated, and the check fails if any non-Administrator identity has write access. On Windows, this can occur as a side effect of how File Explorer operates.
When a user who is a member of the Administrators group but not elevated uses File Explorer, Explorer runs under a filtered token. If that user navigates to the Agent directory, which requires Administrator access, a UAC prompt is triggered. To avoid running whole explorer process with full administrative privileges, Windows applies a workaround that adds a copy of the Administrator ACE to the directory ACL, scoped to the user SID.
This behavior introduces an additional identity with write permissions, which causes the OSQuery validation to fail.
This PR works around the issue in a deliberately simple way. It adds an ACE for the INTERACTIVE (logged-in) user with List Directory and Traverse permissions only. This does not allow file reads, only directory listing, which is not sensitive. With this in place, no UAC prompt is raised and the DACL is not modified in a way that breaks OSQuery validation.
Downside of this is that user won't be prompted with UAC and when opening a log files they will run into access denied in their editor. They either need to change perms for log, run elevated editor and open it directly or use our tools like diagnostics or logs subcommand which is in my opinion preferred way.
Fixes #7260
Fixes: #6792