GuidesSecurity

tailscale: "Access denied", sudo or --operator=$USER on Linux

On Linux only root, or one operator user, can change tailscaled. Use sudo, or run sudo tailscale set --operator=$USER once. What the operator can then do.

November 20, 2026The Everpod team
The short answer

On Linux, tailscaled runs as root, and it lets any local user read its state but only root, or one user named as its operator, change it. A tailscale up, set, serve or logout run as anyone else is refused with “Access denied”. Run the command with sudo, or run sudo tailscale set --operator=$USER once so that user can manage Tailscale without it. Serving a file, directory or Unix socket still needs root. If the reason after “Access denied:” is about a tailnet setting rather than permissions, sudo will not help: in v1.104.7 the sudo hint is printed for those refusals too.

What the message says

When the tailscale command gets a refusal from the local daemon, it prints Access denied: followed by the daemon’s reason. On any system but Windows, when you are not root, it then adds two lines naming your own command. As the v1.104.7 code formats it, the whole message has this shape:

Access denied: <reason>

Use 'sudo tailscale <your command and its flags>'.
To not require root, use 'sudo tailscale set --operator=$USER' once.
Copied

The reason names the operation the daemon refused. Among those in its local API: prefs write access denied (changing a setting, as tailscale set does), checkprefs access denied, login access denied, logout access denied, profiles access denied (switching accounts), and a bare access denied from several operations, including the start that tailscale up performs. All of these mean the same thing: your user may read Tailscale’s state but not change it. That is why tailscale status works for the same user, while the next command that would change something fails.

Why only root can change it

Tailscale’s troubleshooting page puts it in one line: “The Tailscale daemon (tailscaled) typically runs as the root user, and so only root can manage the daemon.” In the v1.104.7 code, every local connection may read; write access goes to root, to the user the daemon itself runs as if that is not root, and to the configured operator. macOS also lets its admin group write; on Linux there is no such group, so a sudo-capable user is still refused until it uses sudo.

The two fixes

Run it as root. Repeat the command with sudo, exactly as the hint prints it. For a step you do once, this is the simplest choice and changes nothing about who can manage the machine afterwards.

Make your user the operator. Once, with sudo:

sudo tailscale set --operator=$USER
Copied

$USER is expanded by your shell before sudo runs, so it names you, not root; put a username there instead to name another account. Use tailscale set for this on a machine that is already connected: tailscale up --operator=… also exists, but on a running machine up refuses a new flag unless every other non-default setting is repeated, as tailscale up requires mentioning all non-default flags explains.

After that the user can, in Tailscale’s words, “manage Tailscale without sudo, including Serve and Funnel port targets”. What stays root-only is what the same page names: “Serving a file, directory, or Unix socket with tailscale serve or tailscale funnel still requires root.” So tailscale serve 3000 works for the operator, and serving a path such as a folder still needs sudo.

What the operator can do, on a shared server

There is one operator, and the code describes it as a user “allowed to operate tailscaled without being root or using sudo”: it passes the same write check root passes. Every program running as that user gets that access too. If an AI agent runs as your user, the agent can then run, without a password, the same tailscale set and tailscale logout commands root could: changing the exit node, advertising routes, turning Tailscale SSH on or off, switching or logging out the account. On a server you reach only over Tailscale, a logout or a change to Tailscale SSH can cut you off.

That can be what you want: an agent that manages its own tailscale serve ports is the usual reason to set it. If the agent runs as its own user and only you should manage the network, make your account the operator and not the agent’s, or set none and use sudo. An agent that cannot use sudo at all, for example inside a coding agent’s sandbox, gets the same refusal whatever it tries; the “no new privileges” guide covers running such a root step. How to keep the server itself from reaching your other devices is in Tailscale SSH for an AI agent server.

When sudo will not help

The hint is added to every refusal the daemon answers with HTTP 403, and in v1.104.7 not all of those are about your user. An open issue, filed on November 18, 2026 against 1.104.7, shows tailscale drive list printing this, with the sudo hint after it:

Access denied: taildrive sharing not enabled, please add the attribute "drive:share" to this node in your ACLs' "nodeAttrs" section
Copied

Running that with sudo, or as the operator, is refused the same way, because the cause is the tailnet’s policy: here, the drive:share attribute the message names. So read the reason after the colon first. If it names an operation and says “access denied”, it is about your user; if it names a feature or a policy, fix that and ignore the hint. A fix that stops such refusals from being reported as permission errors is open and not yet in a release.

If the command instead says it cannot connect to the local tailscaled at all, the daemon is not running, which is a different problem; Tailscale in a container covers running the daemon where no system service starts it.

Run Claude Code, Codex, OpenCode, Pi, Hermes or OpenClaw on an always-on developer pod.

A developer pod is a permanent cloud computer (VPS), set up and secured for you, with your pick of Claude Code, Codex, OpenCode, Pi, Hermes and OpenClaw installed. Run more agents at once than your laptop can hold, and keep them working when it’s closed. From $24 a month, built in about ten minutes.