rollback uid and gid for Wazuh indexer and dashboard owner

This commit is contained in:
vcerenu
2024-03-11 10:05:53 -03:00
parent b4af946000
commit 387727d496
4 changed files with 28 additions and 17 deletions

View File

@@ -47,5 +47,16 @@ echo "Changing certificate permissions"
chmod -R 500 /certificates
chmod -R 400 /certificates/*
echo "Setting UID indexer and dashboard"
chown 999:999 /certificates/*
chown 1000:1000 /certificates/*
echo "Setting UID for wazuh manager and worker"
cp /certificates/root-ca.pem /certificates/root-ca-manager.pem
cp /certificates/root-ca.key /certificates/root-ca-manager.key
chown 999:999 /certificates/root-ca-manager.pem
chown 999:999 /certificates/root-ca-manager.key
for i in ${node_names[@]};
do
chown 999:999 "/certificates/${i}.pem"
chown 999:999 "/certificates/${i}-key.pem"
done