Skip to content

Instantly share code, notes, and snippets.

@giper45
Last active April 27, 2021 11:08
Show Gist options
  • Save giper45/707bb9c047a10d75e89705e63415b431 to your computer and use it in GitHub Desktop.
Save giper45/707bb9c047a10d75e89705e63415b431 to your computer and use it in GitHub Desktop.
Fix wazuh unsecure key permissions
docker-compose -f production-cluster.yml exec elasticsearch "chmod 700 /usr/share/elasticsearch/config && chmod 600 /usr/share/elasticsearch/config/elasticsearch.yml && chmod 600 /usr/share/elasticsearch/config/node1.key && chmod 600 /usr/share/elasticsearch/config/root-ca.pem && chmod 600 /usr/share/elasticsearch/config/node1.pem"
docker-compose -f production-cluster.yml exec elasticsearch-2 "chmod 700 /usr/share/elasticsearch/config && chmod 600 /usr/share/elasticsearch/config/elasticsearch.yml && chmod 600 /usr/share/elasticsearch/config/node2.key && chmod 600 /usr/share/elasticsearch/config/root-ca.pem && chmod 600 /usr/share/elasticsearch/config/node2.pem"
docker-compose -f production-cluster.yml exec elasticsearch-3 "chmod 700 /usr/share/elasticsearch/config && chmod 600 /usr/share/elasticsearch/config/elasticsearch.yml && chmod 600 /usr/share/elasticsearch/config/node2.key && chmod 600 /usr/share/elasticsearch/config/root-ca.pem && chmod 600 /usr/share/elasticsearch/config/node2.pem"
@giper45
Copy link
Author

giper45 commented Apr 27, 2021

Not inside compose:

chmod 700 wazuh-odfe/config kibana-odfe/config/
chmod 600 ./elastic_conf/elasticsearch.yml
chmod 600  production_cluster/ssl_certs/*key production_cluster/ssl_certs/*pem
chmod 600  production_cluster/ssl_certs/root-ca.*

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment