-
Notifications
You must be signed in to change notification settings - Fork 81
Grant Write Permission for HZ_HOME [DEX-457] #1009
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
Conversation
…te logs on default config.
I would really like a test to cover this change - maybe on the hazelcast side? |
|
Sure, @cheels is already started to test. |
|
Not sure worth adding a test or enable logging or something so this gets tested during simple-smoke-test.sh Surprised this wasn't fixed much earlier. I mean how did it work before! |
hazelcast-enterprise/Dockerfile
Outdated
| && echo "Granting read permission to ${HZ_HOME}" \ | ||
| && chmod -R +r ${HZ_HOME} \ | ||
| && echo "Granting read&write permission to ${HZ_HOME}" \ | ||
| && chmod -R +rw ${HZ_HOME} \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'w' is not enough to allow files to be written into /opt/hazelcast directory
You have to add chmod -R a+rwX
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed.
Thanks - I'll hold off approving until that if that's ok? I think the change is fine but I wouldn't have spotted #1009 (comment) so good to be confident. |
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This increases the risk of accidental or malicious changes to binaries, configs, or scripts, potentially compromising security and stability. Limiting permissions to read helps protect the integrity of the Hazelcast instance.
Why not use a custom hazelcast.diagnostics.directory?
I've tested it with:
docker run --rm -it -e HZ_LICENSEKEY -e HZ_INSTANCETRACKING_FILENAME=/dev/null -e JAVA_OPTS="-Dhazelcast.diagnostics.enabled=true -Dhazelcast.diagnostics.directory=/tmp" hazelcast/hazelcast-enterprise:latest-snapshot
|
@ldziedziul diagnostics has already a default path config but it points to |
However, we can change the path specifically within the Docker images. Currently, diagnostics doesn't work in Docker at all, so it’s hardly a breaking change. Side note: IMHO, compromising security and stability just to avoid a "breaking change" is a very questionable decision. |
|
PR closed by Hazelcast automation as no activity (>3 months). Please reopen with comments, if necessary. Thank you for using Hazelcast and your valuable contributions |
The docker image fails to write diagnostics logs on default config. The default directory for logging output is
HZ_HOMEbut it's missing the write permission. Apparently, the issue was there but it's catch during DEX-320 verifications.Unfortunately, I couldn't find a way to put proper testing on Docker containers.