-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set directory ownership explicitly during setup #626
Merged
jherbel
merged 7 commits into
main
from
dev/joerg/CMK-20037_explicit_directory_ownership
Nov 7, 2024
Merged
Set directory ownership explicitly during setup #626
jherbel
merged 7 commits into
main
from
dev/joerg/CMK-20037_explicit_directory_ownership
Nov 7, 2024
Conversation
This file contains 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
jherbel
force-pushed
the
dev/joerg/CMK-20037_explicit_directory_ownership
branch
5 times, most recently
from
November 4, 2024 12:17
9a4d73f
to
94f8ab7
Compare
SoloJacobs
requested changes
Nov 5, 2024
jherbel
force-pushed
the
dev/joerg/CMK-20037_explicit_directory_ownership
branch
2 times, most recently
from
November 5, 2024 13:57
2352762
to
3dc5858
Compare
SoloJacobs
requested changes
Nov 7, 2024
All sub-directories (managed, plans, rcc_setup) are now managed internally. This ensures that we have a single parent directory whose ownership we can set. CMK-20037
The new name actually describes what we are setting up.
* Linux: Transfer ownership to current user and group. * Windows: Transfer ownership to administrator group. This has two advantages: 1) We don't have to find out the name of the current user. 2) This seems to be default for files created by the local system account SYSTEM, under which the scheduler is usually executed when it is run by the Windows agent. For both Linux and Windows, we don't follow symbolic links. The scheduler itself is not creating any, so the only place where we might expect to find symbolic links is the managed robots directory. Since we anyway remove and re-create the managed robots directory during the setup, there is no need to explicitly set the ownership of this directory. CMK-20037
* Linux: Transfer ownership to current user and group. * Windows: Transfer ownership to administrator group. CMK-20037
…rectories * Linux: Transfer ownership to current user and group. * Windows: Transfer ownership to administrator group. Directory structure: working_directory |__ plans |__ {plan_id} The actual files created when running the plans might belong to a different user, either because an explicit user is set in the plan configuration (Windows only) or because the scheduler was previously executed as a different user. Both cases are ok, since we are not using these files in any way. Eventually, they are cleaned up. However, the parent directories should definitely belong to us, such that no unauthorized user can attempt to modify new files we create. CMK-20037
* Linux: Transfer ownership to current user and group. * Windows: Transfer ownership to administrator group. Files in this directory are never written by a different user, so we can take ownership recursively. If the scheduler was previously executed as a different user, it's OK for us to take over ownership, since the previous user must anyway have elevated access. CMK-20037
jherbel
force-pushed
the
dev/joerg/CMK-20037_explicit_directory_ownership
branch
from
November 7, 2024 13:49
3dc5858
to
48d5f7a
Compare
SoloJacobs
approved these changes
Nov 7, 2024
Nice 👍 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
No description provided.