Tailscale SSH cannot switch local users with the default systemd capabilities
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 38.1k
- Forks
- 4.6k
- Avg merge
- 19d 15h
- Merged PRs (30d)
- 1
Description
Environment
- CachyOS (Arch-based), Linux x86_64
- sing-box 1.14.0
- Command-line program running through systemd
- Local user's shell:
/bin/fish
Problem
After enabling Tailscale SSH and allowing a normal local user through the SSH policy, connecting from another tailnet device authenticates successfully, but the shell fails to start:
failed to open shell: fork/exec /bin/fish: operation not permitted
The installed service has the same user and capability settings as upstream's release/config/sing-box.service:
User=sing-box
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_RAW CAP_NET_BIND_SERVICE CAP_SYS_PTRACE CAP_DAC_READ_SEARCH
AmbientCapabilities=CAP_NET_ADMIN CAP_NET_RAW CAP_NET_BIND_SERVICE CAP_SYS_PTRACE CAP_DAC_READ_SEARCH
Verified workaround
Adding this systemd drop-in, which extends the existing capability lists with CAP_SETUID and CAP_SETGID, and restarting the service fixes the problem:
[Service]
CapabilityBoundingSet=CAP_SETUID CAP_SETGID
AmbientCapabilities=CAP_SETUID CAP_SETGID
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read release/config/sing-box.service and compare its CapabilityBoundingSet and AmbientCapabilities with the documented Tailscale SSH failure. Verify that the service can start a shell for a switched local user after the capability configuration is updated, while preserving existing proxy operation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 76/100