最近把站点的代理从v2ray 换成trojan ,配置了nginx,代理证书等,但是在配置证书的访问权限时, 遇到了一个子进程权限的问题
drwxr-x--- 4 trojan root 4096 Mar 6 14:48 accounts
drwxr-x--- 3 trojan certusers 4096 Mar 6 14:35 archive
drwxr-x--- 2 trojan root 4096 Mar 6 14:34 csr
drwxr-x--- 2 trojan root 4096 Mar 6 14:34 keys
drwxr-x--- 3 trojan certusers 4096 Mar 6 14:35 live
-rwxr-x--- 1 trojan root 721 Mar 6 14:32 options-ssl-nginx.conf
drwxr-x--- 2 trojan root 4096 Mar 6 14:35 renewal
drwxr-x--- 5 trojan root 4096 Mar 6 14:32 renewal-hooks
-rwxr-x--- 1 trojan root 424 Mar 6 14:32 ssl-dhparams.pem
[Unit]
Description=trojan
Documentation=man:trojan(1) https://trojan-gfw.github.io/trojan/config https://trojan-gfw.github.io/trojan/
After=network.target network-online.target nss-lookup.target mysql.service mariadb.service mysqld.service
[Service]
Type=simple
StandardError=journal
User=trojan
AmbientCapabilities=CAP_NET_BIND_SERVICE
ExecStart=/usr/bin/trojan /etc/trojan/config.json
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
RestartSec=3s
[Install]
WantedBy=multi-user.target
Mar 07 08:37:24 instance-1 systemd[1]: Started trojan.
Mar 07 08:37:24 instance-1 trojan[11066]: Welcome to trojan 1.14.1
Mar 07 08:37:24 instance-1 trojan[11066]: [2021-03-07 08:37:24] [FATAL] fatal: use_certificate_chain_file: Permission denied
Mar 07 08:37:24 instance-1 trojan[11066]: [2021-03-07 08:37:24] [FATAL] exiting. . .
Mar 07 08:37:24 instance-1 systemd[1]: trojan.service: Main process exited, code=exited, status=1/FAILURE
Mar 07 08:37:24 instance-1 systemd[1]: trojan.service: Failed with result 'exit-code'.
Mar 07 08:37:27 instance-1 systemd[1]: trojan.service: Scheduled restart job, restart counter is at 14.
Mar 07 08:37:27 instance-1 systemd[1]: Stopped trojan.
drwxr-xr-x 4 trojan root 4096 Mar 6 14:48 accounts
drwxr-xr-x 3 trojan certusers 4096 Mar 6 14:35 archive
drwxr-xr-x 2 trojan root 4096 Mar 6 14:34 csr
drwxr-xr-x 2 trojan root 4096 Mar 6 14:34 keys
drwxr-xr-x 3 trojan certusers 4096 Mar 6 14:35 live
-rwxr-xr-x 1 trojan root 721 Mar 6 14:32 options-ssl-nginx.conf
drwxr-xr-x 2 trojan root 4096 Mar 6 14:35 renewal
drwxr-xr-x 5 trojan root 4096 Mar 6 14:32 renewal-hooks
-rwxr-xr-x 1 trojan root 424 Mar 6 14:32 ssl-dhparams.pem