Files
systemd/presets
Michael Vogt 7321925477 units: add optional varlink-sftp socket and service
With the varlink protocol upgrade feature we can use provide
file system access via varlink easily by re-using the existing
sftp standard. SFTP is independant of ssh and provides a well
defined and widely used file transfer protocol.

So here we add two new (optional) varlink interfaces:
- io.systemd.Sftp.Root.Connect
- io.systemd.Sftp.RootReadOnly.Connect

They are behind polkit auth as io.systemd.sftp.root{,-read-only}.

Note that handing this is out is equivalent for giving root
access: even ReadOnly mode will allow to read secrets like
/etc/shadow so its inherently risky. The two actions mostly
exist to prevent accidents not as a (strong) protection
boundary. The unit description warns about this and the polkit
prompt also describes the full implications.

The use cases are:
- file access via the varlink-http-bridge [1]
- file access over AF_VSOCK

The install is optional and turned off by default.

[1] https://github.com/systemd/varlink-http-bridge
2026-10-30 20:06:11 +01:00
..