Repository navigation
fix(tunnel): 修复 Linux cloudflared 权限 - #246
Merged
Merged
Conversation
uvwt
force-pushed
the
fix/linux-cloudflared-permissions-20261018
branch
from
October 18, 2026 06:46
16fffd3 to
e03dc53
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
根因
Linux 上 cloudflared component 由 root/sudo 安装时,component store 的目录和二进制为
0700。Tunnel systemd 服务以非 root service user 运行,导致fork/exec .../cloudflared: permission denied,服务进入自动重启循环。修复
components/cloudflared、版本目录和最终 cloudflared 二进制为0755tunnel start/restart后增加短暂存活确认;服务立即退出时直接报错,不再返回completed:true验证
go test ./... -count=1go vet ./...git diff --check实机日志已确认故障表现为 cloudflared
permission denied且 systemd 连续自动重启。