-
Notifications
You must be signed in to change notification settings - Fork 143
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
Fix permissions for Ironbank images #4539
Comments
Pinging @elastic/elastic-agent (Team:Elastic-Agent) |
find /usr/share/elastic-agent/data/elastic-agent-*/components -maxdepth 1 -type f -not -name "*.*"
Would the below work? find /usr/share/elastic-agent/data/elastic-agent-*/components -maxdepth 4 -type d -exec chmod 0660 {} \; and find /usr/share/elastic-agent/data/elastic-agent-*/components -maxdepth 1 -type f -not -name "*.*" -exec chmod 0755 {} \; |
chown: cannot access '/usr/share/elastic-agent/data/elastic-agent-*/components/mod': No such file or directory |
After further testing with the initial dockerfile I also ran into the following error(s) when launching elastic agent (ironbank)
There were various .yml files that seemed to have the group writeable permissions that it didn't like. I fixed this with the following Dockerfile
I will try to test this with @zedtran 's suggestions
|
If we need the container images to run as read-only anyway, is it reasonable to actually remove root write permissions here? Or is that a change for later? |
My initial testing results with the container unable to start, the find command
Changes the following files
Container fails to start with the following error
|
There is no reason the module YAML files need to be writable in our container, or really at all when built as part of agent. This is a permanent change we could make to the agent container. For 8.14+ we could do this as part of the agentbeat build which added control of these fields in elastic/beats#39278. For 7.17.x we have to do this in a different way. |
@Eric-Domeier, the
I did not encounter the errors you observed related to the noted I hope that helps. |
Edit: @Eric-Domeier, as there are other file extensions like find /usr/share/elastic-agent/data/elastic-agent-*/components -maxdepth 4 -type f -name "*.*" -exec chmod 0640 {} \; Below would override the find /usr/share/elastic-agent/data/elastic-agent-*/components -maxdepth 4 -type f -name "*.*" -exec chmod 0660 {} \; |
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
group permissions are missing.
The text was updated successfully, but these errors were encountered: