Skip to content

Permission denied when generating Wazuh self-signed certificates #2045

@fannyhasbi

Description

@fannyhasbi

I am having issue when trying to generate the Wazuh self-signed certificate using the docker-compose -f generate-indexer-certs.yml run --rm generator

here is the output

The tool to create the certificates exists in the in Packages bucket
23/10/2025 04:03:06 INFO: Generating the root certificate.
23/10/2025 04:03:06 INFO: Generating Admin certificates.
23/10/2025 04:03:06 INFO: Admin certificates created.
23/10/2025 04:03:06 INFO: Generating Wazuh indexer certificates.
23/10/2025 04:03:07 INFO: Wazuh indexer certificates created.
23/10/2025 04:03:07 INFO: Generating Filebeat certificates.
23/10/2025 04:03:07 INFO: Wazuh Filebeat certificates created.
23/10/2025 04:03:07 INFO: Generating Wazuh dashboard certificates.
23/10/2025 04:03:07 INFO: Wazuh dashboard certificates created.
Moving created certificates to the destination directory
Changing certificate permissions
Setting UID indexer and dashboard
Setting UID for wazuh manager and worker
cp: cannot create regular file '/certificates/root-ca-manager.pem': Permission denied
cp: cannot create regular file '/certificates/root-ca-manager.key': Permission denied
chown: cannot access '/certificates/root-ca-manager.pem': No such file or directory
chown: cannot access '/certificates/root-ca-manager.key': No such file or directory

I see there is no Mac/Apple OS is listed in the System requirement in this official documentation: https://documentation.wazuh.com/current/deployment-options/docker/wazuh-container.html

Does this problem arise because I am using macos when I run the command? I am running the command on MacBook Pro M4.

Container runtime: Colima (https://github.com/abiosoft/colima)
Docker compose: using docker-compose via brew (https://formulae.brew.sh/formula/docker-compose)

Edit:
I also try to copy manually on the local volume using this command:

sudo cp root-ca.pem root-ca-manager.pem
sudo cp root-ca.key root-ca-manager.key

and then run the docker compose again, but it's giving more issues

The tool to create the certificates exists in the in Packages bucket
23/10/2025 04:13:33 INFO: Generating the root certificate.
23/10/2025 04:13:33 INFO: Generating Admin certificates.
23/10/2025 04:13:33 INFO: Admin certificates created.
23/10/2025 04:13:33 INFO: Generating Wazuh indexer certificates.
23/10/2025 04:13:34 INFO: Wazuh indexer certificates created.
23/10/2025 04:13:34 INFO: Generating Filebeat certificates.
23/10/2025 04:13:34 INFO: Wazuh Filebeat certificates created.
23/10/2025 04:13:34 INFO: Generating Wazuh dashboard certificates.
23/10/2025 04:13:34 INFO: Wazuh dashboard certificates created.
Moving created certificates to the destination directory
cp: cannot create regular file '/certificates/root-ca.key': Permission denied
cp: cannot create regular file '/certificates/root-ca.pem': Permission denied
cp: cannot create regular file '/certificates/wazuh.dashboard-key.pem': Permission denied
cp: cannot create regular file '/certificates/wazuh.dashboard.pem': Permission denied
cp: cannot create regular file '/certificates/wazuh.indexer-key.pem': Permission denied
cp: cannot create regular file '/certificates/wazuh.indexer.pem': Permission denied
cp: cannot create regular file '/certificates/wazuh.manager-key.pem': Permission denied
cp: cannot create regular file '/certificates/wazuh.manager.pem': Permission denied
Changing certificate permissions
chmod: changing permissions of '/certificates/root-ca-manager.key': No such file or directory
chmod: changing permissions of '/certificates/root-ca-manager.pem': No such file or directory
chmod: changing permissions of '/certificates/root-ca-manager.key': No such file or directory
chmod: changing permissions of '/certificates/root-ca-manager.pem': No such file or directory
Setting UID indexer and dashboard
chown: changing ownership of '/certificates/root-ca-manager.key': No such file or directory
chown: changing ownership of '/certificates/root-ca-manager.pem': No such file or directory
Setting UID for wazuh manager and worker
cp: cannot create regular file '/certificates/root-ca-manager.pem': Permission denied
cp: cannot create regular file '/certificates/root-ca-manager.key': Permission denied
chown: cannot access '/certificates/root-ca-manager.pem': Permission denied
chown: cannot access '/certificates/root-ca-manager.key': Permission denied

I would like to install Wazuh on my laptop for testing purposes.

Thanks in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions