我的 CentOS 7 机器上运行着 nginx。每天我都会运行一个 cron 作业来生成新的 Diffie-Hellman 参数。它们保存在/etc/ssl/dh/dhparam.pem
. 但是 SELinux 正在阻止 nginx 读取此文件。
这是 nginx 错误日志中的一行:
nginx[3189]: nginx: [emerg] BIO_new_file("/etc/ssl/dh/dhparam.pem") failed (SSL: error:0200100D:system library:fopen:Permission denied:fopen('/etc/ssl/dh/dhparam.pem','r') error:2006D002:BIO routines:BIO_new_file:system lib)
这是审计日志:
type=AVC msg=audit(1473285202.181:334): avc: denied { open } for pid=1393 comm="nginx" path="/etc/ssl/dh/dhparam.pem" dev="dm-1" ino=101646309 scontext=system_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:user_tmp_t:s0 tclass=file
type=AVC msg=audit(1473285832.647:743): avc: denied { open } for pid=2958 comm="nginx" path="/etc/ssl/dh/dhparam.pem" dev="dm-1" ino=101646309 scontext=system_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:user_tmp_t:s0 tclass=file
type=AVC msg=audit(1473287010.821:803): avc: denied { open } for pid=3083 comm="nginx" path="/etc/ssl/dh/dhparam.pem" dev="dm-1" ino=101646316 scontext=system_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:user_tmp_t:s0 tclass=file …
Run Code Online (Sandbox Code Playgroud) 我目前正在规划我的新邮件服务器,并且一直在思考一件简单的事情:DNS 设置。大多数 MX 记录看起来像mail.doomain.tld或mx01.domain.tld。使用这样的格式有什么好处,或者我可以只使用domain.tld吗?