kylemanna / docker-openvpn

🔒 OpenVPN server in a Docker container complete with an EasyRSA PKI CA
https://hub.docker.com/r/kylemanna/openvpn/
MIT License
8.62k stars 2.37k forks source link

Permission denied in container when running ovpn_genconfig #641

Closed rdcavanha closed 3 years ago

rdcavanha commented 3 years ago

When running the command: docker-compose run --rm openvpn ovpn_genconfig -u tcp:/my.domain.com

I get the following error:

Creating openvpn_openvpn_run ... done
mkdir: can't create directory '/etc/openvpn/ccd': Permission denied
Traceback (last called is first):
    main() in /usr/local/bin/ovpn_genconfig:272
The command mkdir -P ${OPENVPN:-}/cdd exited with exit code 1.
Cleaning up before Exit ...

I'm following the project's docker-compose guide. Latest docker-openvpn image. The config dir is correctly mapped in the docker-compose file.

rdcavanha commented 3 years ago

Alright, I've figured it out. It had to do with SELinux. All I had to do was to set it to permissive on my Fedora server.

jcantuk2413 commented 2 years ago

hello, are you help me please. I'm installing helm on my kubernetes cluster, but it won't run, it always shows permission denied error.