From 97f1ec93e2520af483ab54ca5db4a458de65672c Mon Sep 17 00:00:00 2001 From: Dct Mei Date: Sun, 14 Jun 2020 09:38:28 +0800 Subject: [PATCH] feat: Permission issues for certificate use Supplement and explanation for the problem of insufficient authority for certificate use. --- README.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/README.md b/README.md index bc2ec71..1ea3b74 100644 --- a/README.md +++ b/README.md @@ -85,6 +85,50 @@ or # bash install-release.sh --remove ``` +### 證書權限問題 + +假设,证书文件的所在路径为 `/srv/http/`,文件分别为 `/srv/http/example.com.key` 和 `/srv/http/example.com.pem`。 + +方案一: + +`/srv/http/` 的默认权限一般为 755,`/srv/http/example.com.key` 的默认权限一般为 600,`/srv/http/example.com.pem` 的默认权限一般为 644。 + +将 `/srv/http/example.com.key` 修改为 644 即可: + +``` +# chmod 644 /srv/http/example.com.key +``` + +方案二: + +``` +# id nobody +``` + +显示出来的结果可能是: + +``` +uid=65534(nobody) gid=65534(nogroup) groups=65534(nogroup) +``` + +也可能是: + +``` +uid=65534(nobody) gid=65534(nobody) groups=65534(nobody) +``` + +相应的,只需要执行: + +``` +# chown -R nobody:nogroup /srv/http/ +``` + +或是: + +``` +# chown -R nobody:nobody /srv/http/ +``` + ## 參數 ```