# libtmux:server-access

- **Package:** libtmux
- **Language:** Common Lisp
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-lisp/blob/c2e5fc4ed3befda21f45dfa5d5868c38fd138311/src/server-operations.lisp#L3
- **Public owner:** libtmux
- **Page:** https://libtmux.org/en/lisp/latest/reference/libtmux-server-access/

```
(server-access client principal access &key group-p cancel-token timeout output-limit)
```

Change PRINCIPAL's native daemon ACL entry; return a COMMAND-OUTCOME.
PRINCIPAL is a nonempty literal account name, resolved by the daemon's name
service, not a numeric UID/GID. GROUP-P selects a group and requires live tmux
3.8; older daemons signal UNSUPPORTED-CAPABILITY before payload dispatch.

ACCESS is :ALLOW (add a writable entry), :DENY (remove an entry), :READ-ONLY
or :READ-WRITE (update or add). Adding an existing entry and removing an absent
one are errors. Root and the daemon-owner UID cannot be changed. :DENY creates
no deny rule: from 3.8, a removed user can still match its peer GID's entry.
Explicit UID entries take precedence over that GID; supplementary groups are
not searched. Cross-user filesystem access must be configured separately.

From 3.8, removal and permission updates recompute every connected client's
read-only state. This can clear an unrelated frontend's separate read-only
flag when its effective ACL entry is writable. Updates can schedule client
disconnection; success does not prove frontend exit. Already scheduled exits
are not cancelled by a later grant.

Blocks under shared preflight/dispatch limits, acquires no observation and
never retries. Invalid input signals INVALID-ARGUMENT; native errors and
uncertain effects retain their outcome. Earlier captures stay unchanged.

See also: `libtmux:error-outcome`, `libtmux:fetch-clients`, `libtmux:list-server-access`, `libtmux:refresh`.

## Parameters

- `client`
- `principal`
- `access`
- `group-p?`
- `cancel-token?`
- `timeout?`
- `output-limit?`

## tmux command

The tmux commands behind `server-access`.

- [`server-access`](/en/tmux/latest/manual/server-access/)

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_server_access_entry`](/en/tmux/latest/reference/c-variable-cmd_server_access_entry/) (attribute)
- [`cmd_server_access_exec`](/en/tmux/latest/reference/c-function-cmd-server-access-c-cmd_server_access_exec/) (function)

## Guides

Pages that discuss `server-access`.

- [Explicit operations](/en/lisp/latest/guides/operations/)
