generating self signed SSL certifcate, permissions error (OSX) -
i'm following this tutorial. i've got dnsmasq working getting permissions error when trying generate self-signed certificate using script:
#!/usr/bin/env sh cat > openssl.conf <<-eof [req] distinguished_name = site_distinguished_name x509_extensions = v3_site prompt = no [site_distinguished_name] cn = *.${pwd##*/}.dev [v3_site] keyusage = keyencipherment, dataencipherment extendedkeyusage = serverauth subjectaltname = @domains [domains] dns.1 = *.${pwd##*/}.dev dns.2 = ${pwd##*/}.dev eof openssl req -new -newkey rsa:2048 -sha256 \ -days 3650 -nodes -x509 -keyout site.key \ -out site.crt -config openssl.conf
here's i'm getting in terminal
project_directory $ ./ssl_cert_gen.sh -bash: ./ssl_cert_gen.sh: permission denied project_directory $ sudo ./ssl_cert_gen.sh password: sudo: ./ssl_cert_gen.sh: command not found
am way off? ideas? in advance.
you have make script executable:
$ chmod +x ssl_cert_gen.sh
all executable files in unix must have corresponding executable (x
) bit set, otherwise kernel won't execute them. scripts executables too, utilise "shebang" mechanism (#!
) specify name of interpreter.
Comments
Post a Comment