[GH-ISSUE #901] [Bug] 二进制文件部署时无法正确创建 pb_data #614

Closed
opened 2026-03-03 01:04:41 +03:00 by kerem · 4 comments
Owner

Originally created by @Inflorescentia on GitHub (Aug 2, 2025).
Original GitHub issue: https://github.com/certimate-go/certimate/issues/901

软件版本 / Release Version

v0.3.25

缺陷描述 / Description

依照 FHS 部署二进制文件后启动失败。看起来是因为 pb_data 没有创建在工作目录。详见复现步骤。

复现步骤 / Steps to reproduce

  1. 放置二进制文件到 /usr/local/bin/
  2. 创建 certimate.service
[Unit]
Description=Certimate
After=network.target
[Service]
ExecStart=/usr/local/bin/certimate serve
Restart=on-failure
User=certimate
Group=certimate
PrivateTmp=true
WorkingDirectory=/var/lib/certimate/
[Install]
WantedBy=multi-user.target
  1. sudo systemctl start certimate.service
  2. 报错 ERROR [CERTIMATE] Start failed. err="mkdir /usr/local/bin/pb_data: permission denied"

日志 / Logs

No response

其他 / Miscellaneous

No response

贡献 / Contribution

  • 我乐意为此贡献 PR! / I am interested in contributing a PR for this!
Originally created by @Inflorescentia on GitHub (Aug 2, 2025). Original GitHub issue: https://github.com/certimate-go/certimate/issues/901 ### 软件版本 / Release Version v0.3.25 ### 缺陷描述 / Description 依照 FHS 部署二进制文件后启动失败。看起来是因为 `pb_data` 没有创建在工作目录。详见复现步骤。 ### 复现步骤 / Steps to reproduce 1. 放置二进制文件到 `/usr/local/bin/` 下 2. 创建 `certimate.service` ``` [Unit] Description=Certimate After=network.target [Service] ExecStart=/usr/local/bin/certimate serve Restart=on-failure User=certimate Group=certimate PrivateTmp=true WorkingDirectory=/var/lib/certimate/ [Install] WantedBy=multi-user.target ``` 3. `sudo systemctl start certimate.service` 4. 报错 `ERROR [CERTIMATE] Start failed. err="mkdir /usr/local/bin/pb_data: permission denied"` ### 日志 / Logs _No response_ ### 其他 / Miscellaneous _No response_ ### 贡献 / Contribution - [x] 我乐意为此贡献 PR! / I am interested in contributing a PR for this!
kerem 2026-03-03 01:04:41 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@Inflorescentia commented on GitHub (Aug 3, 2025):

已提交 PR

<!-- gh-comment-id:3148461305 --> @Inflorescentia commented on GitHub (Aug 3, 2025): 已提交 PR
Author
Owner

@usual2970 commented on GitHub (Aug 4, 2025):

  1. 报的错表明:没有权限创建pb_data。

你可以提前创建好并赋予权限解决。

  1. certimate 本就支持--dir 指定数据的存放位置。
<!-- gh-comment-id:3148883112 --> @usual2970 commented on GitHub (Aug 4, 2025): 1. 报的错表明:没有权限创建pb_data。 > 你可以提前创建好并赋予权限解决。 2. certimate 本就支持--dir 指定数据的存放位置。
Author
Owner

@Inflorescentia commented on GitHub (Aug 4, 2025):

  1. /usr/local/bin/certimate 下创建目录存放数数据是不推荐的做法。
  2. 我已经尝试添加 --dir /var/lib/certimate/pb_data ,但会报错 flag provided but not defined: -dir

不过我的需求很小众,就不重开了

<!-- gh-comment-id:3149169046 --> @Inflorescentia commented on GitHub (Aug 4, 2025): 1. 在 `/usr/local/bin/certimate` 下创建目录存放数数据是不推荐的做法。 2. 我已经尝试添加 `--dir /var/lib/certimate/pb_data` ,但会报错 `flag provided but not defined: -dir`。 不过我的需求很小众,就不重开了
Author
Owner

@tbc0309 commented on GitHub (Oct 27, 2025):

正确格式:./certimate --dir=/volume1/pb_data --http=0.0.0.0:8191 serve

<!-- gh-comment-id:3449728118 --> @tbc0309 commented on GitHub (Oct 27, 2025): 正确格式:./certimate --dir=/volume1/pb_data --http=0.0.0.0:8191 serve
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/certimate#614
No description provided.