Fix Nginx SSL Permission Denied (0200100D) errorFix Nginx SSL Permission Denied (0200100D) errorFix Nginx SSL Permission Denied (0200100D) error

2022::10::08
1 min
AUTHOR:Z.SHINCHVEN

If you see Nginx SSL Error 0200100D like below, it means that Nginx is not allowed to access the SSL certificate file. This is usually a SELinux issue. You can fix it by using restorecon command to restore the SELinux context of the certificate file.

nginx: [emerg] cannot load certificate "/etc/nginx/ssl/cert.pem": BIO_new_file() failed (SSL: error:0200100D:system library:fopen:Permission denied:fopen('/etc/nginx/ssl/cert.pem',...ew_file:system lib)

Check If SELinux Is Enabled

sestatus
# output
SELinux status:                 enabled

Restore SELinux Security Contexts to Fix Permission

restorecon /etc/nginx/ssl/*
RackNerd Billboard Banner
Share Node:

RELATED_DATA_STREAMS

SCANNING_DATABASE_FOR_CORRELATIONS...