SFTP Users

SFTP users get chrooted access to a site's directory. SftpUserManager creates system users and writes SSH Match blocks so that specified users can only use the SFTP subsystem and are chrooted to the site root. No shell access is granted.

Key file

app/Services/Sftp/SftpUserManager.php

SSH configuration

Snippets are written to wphoster.paths.sshd_config_snippets (e.g. /etc/ssh/sshd_config.d/). Each SFTP user gets a Match block that:

Ensure sshd_config includes: Include /etc/ssh/sshd_config.d/*.conf. Reload SSH daemon after adding/removing users.

Model

app/Models/FtpUser.php — Belongs to Site; fields include username, password (stored for SSH config updates), description, allowed_ips (JSON), is_active.

Config

KeyPurpose
wphoster.paths.sshd_config_snippetsDirectory for SSH Match block snippets (e.g. /etc/ssh/sshd_config.d)

Prerequisites

Panel needs permission to create users and write to the SSH config directory. See README sudoers section for useradd, userdel, chown, chmod, and editing files under sshd_config.d. After changes, run sudo systemctl reload sshd (or equivalent).