site_file_put
Write a small file into a site's web root over SSH, creating parent directories as needed and setting ownership. For one-off files like index.html, .htaccess, or robots.txt.
Instructions
Write a single small file into a site's web root from inline content, over SSH, then chown it to the site's system user. For quick one-off files (index.html placeholder, .htaccess, robots.txt) — the content travels through the model, so keep it small; use site_files_upload/site_files_deploy for real payloads. rel_path is the file path relative to the web root; parent directories are created as needed. WRITE — dry_run:true to preview, confirm:true to execute. Requires SSH (FASTPANEL_SSH_HOST).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| confirm | No | ||
| content | Yes | File contents (max 256KB). Use encoding:'base64' for binary. | |
| dry_run | No | ||
| site_id | Yes | Site id from sites_list | |
| encoding | No | How `content` is encoded. base64 for binary files. | utf8 |
| rel_path | Yes | File path relative to the web root, e.g. 'index.html' or 'assets/robots.txt' |