Skip to content

Instantly share code, notes, and snippets.

@carlessanagustin
Last active January 11, 2022 06:32
Show Gist options
  • Save carlessanagustin/6eec53424ed7c22d77be to your computer and use it in GitHub Desktop.
Save carlessanagustin/6eec53424ed7c22d77be to your computer and use it in GitHub Desktop.
SSL files & folders permissions
#!/usr/bin/env bash
sudo su -
mkdir /etc/ssl
mkdir /etc/ssl/certs
mkdir /etc/ssl/private
chmod 755 /etc/ssl
chmod 755 /etc/ssl/certs
chmod 710 /etc/ssl/private
chown -R root:root /etc/ssl/
chown -R root:root /etc/ssl/certs/
chown -R root:ssl-cert /etc/ssl/private/
chmod 644 /etc/ssl/certs/*.crt # Public Certificates(s)
chmod 644 /etc/ssl/certs/*.pem # Public Certificates(s)
chmod 640 /etc/ssl/private/*.key # Private Key(s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment