A small, strict root agent: why the VinzaPanel web interface never runs as root

VinzaPanel runs its web interface as an unprivileged user and sends privileged work to a small Go agent that accepts only named commands with validated parameters, confines tenant file access and keeps secrets out of logs.

18 Nov 2026 4 min read 43 views
Share

A control panel is a web application that can change everything on your server. If the web interface itself runs as root, any bug in it, from a path check that misses a symlink to a parameter that slips into a shell, is a bug with root privileges. VinzaPanel is built so that the large, internet-facing part never has those privileges in the first place.

Two layers with a narrow door between them

The panel, a Django application served by Daphne, runs as the unprivileged vinzapanel system user. Anything that needs root, such as writing a web server vhost, creating a Linux user, reloading PHP-FPM or reading a root-owned log, is sent to a separate service: vinza-agent, a small Go program.

  • The panel reaches the agent over a Unix socket that only root and the panel's group can open.
  • Each request carries a shared token, which the agent checks with a constant-time comparison.
  • The agent is written in Go with a single external dependency, which keeps the privileged code small enough to review.

The panel still decides who is allowed to do what: roles, ownership and plan limits are enforced there. The agent adds its own independent, fail-closed checks on top, so a logic bug in the panel does not automatically become root access.

Named commands, validated parameters

The agent does not accept free-form requests. Every request names a command such as nginx.reload or mysql.create_db, and goes through a fixed pipeline in which any failed step stops it before the handler runs:

  1. Registry lookup: the command must exist in the agent's registry. Unknown commands are refused.
  2. Licence tier: commands tied to a paid tier are refused on a licence that does not include it.
  3. No unexpected parameters: every key must be declared for that command, or the request is refused.
  4. Validation: every declared parameter must be present and pass its validator. Domains, PHP versions, ports, Linux usernames and service names (from an allowlist of systemd units) are checked. The handler receives the cleaned value, never the raw input.
  5. Owner confinement: for tenant file operations, the resolved path must sit inside that owner's home.

On top of that, path validators block well-known sensitive locations. Files such as /etc/shadow, /etc/sudoers, /root/.ssh and the SSH host private keys can never be read, written or deleted through the agent, and core system directories can never be deleted.

File operations that run as the owner

A hosting account controls everything under /home/<user>, including symlinks. A path that looked safe when it was checked can point somewhere else a moment later, when root acts on it. VinzaPanel closes this gap in several places:

  • When the File Manager works for a non-admin user, the agent resolves the real target path, following symlinks, and refuses anything outside that user's home.
  • Owner-scoped file operations then run in a child process with the tenant's own user and group IDs, so the kernel enforces the tenant's permissions on whatever the path turns out to be.
  • When root does have to write a file or create a directory, the agent walks the path without following links (O_NOFOLLOW) and only follows links in root- or panel-controlled directories, so a planted symlink cannot steer a root write into /etc.
  • A root command on a path inside a home directory is refused when that path leads out of the home, dangling links included.

The web terminal follows the same idea. A tenant's session runs as that tenant's Linux user, and if the requested user is invalid or does not exist, the agent refuses the session instead of falling back to a root shell.

No secrets where other users can see them

Command-line arguments of running processes are visible to every local account through /proc. A recent agent release moved MySQL and PostgreSQL statements to standard input, so passwords in CREATE USER, ALTER USER and role statements no longer appear in process arguments or sudo logs. The same release escapes _ and % in database names in GRANT statements, so a grant on budi_shop no longer also matches budiXshop.

Logging is just as careful:

  • The agent logs command names and parameter key names only, never parameter values.
  • The panel writes every agent call to an audit log with the actor, outcome and duration, and redacts any parameter whose name looks like a password, secret, token, private key or file content. The match is on any key containing pass, which also covers names such as a WordPress admin_pass.

The same rules on every server

With Vinza Server, remote nodes run the same agent. The connection uses TLS with a fingerprint you confirm once, after which the panel pins the certificate. The requests go through the same authentication and the same validation pipeline, so a node is held to the same rules as the panel host.

Get started

There is nothing to switch on: every installation, Free plan included, runs the panel unprivileged and the agent as vinza-agent. You can check both with sudo systemctl status vinza-agent vinza-panel after the installation. For how the pieces fit together, read What is VinzaPanel?, and for the account-level controls built on top of this design, see Users & Roles and Security Advisor.