SFTP access to your website's files
This page turns on file transfer for a website, gives the settings to type into a client, explains which folders you can actually write to and why, and sets up a separate login for somebody who needs one folder and nothing else.
Step 1
Set a password, then switch it on.
Open the website, then File transfer. Set a password for the website’s own account first: the switch refuses to enable access until there is one, because access nobody can use would just be a control that looks on and does nothing.
Then enable it. The panel shows the username, which is the website’s own system account, and you supply the password you just set.
Step 2
Point a client at it.
It is SFTP over SSH, not plain FTP, so there is nothing to configure for encryption and nothing travels in the clear. Any ordinary client works. The settings are:
Protocol SFTP (SSH File Transfer Protocol) Host the server's hostname, or its address Port 22, unless your server's SSH port was changed Username shown on the File transfer page Password the one you set in step 1
From a terminal, the same thing:
sftp websiteaccount@server.example.com # then, at the prompt cd public_html put index.php
Or copy a whole folder up in one go, from the same prompt:
sftp websiteaccount@server.example.com cd public_html put -r ./build
Use sftp rather than scp or rsync. Those two expect to run a command on the far end, and these accounts have no shell to run one in. Recent versions of scp happen to work because they speak SFTP underneath, but older ones fail with an unhelpful message, so sftp is the answer that always works.
If a command on the far end is what you actually want, that is a different setting: an administrator can give a website’s own account a shell, jailed to that website, which is also what an editor working over SSH needs. See Shell access.
Where you land
Why the first folder will not let you write.
A session is confined to the website’s own home directory and cannot see out of it. SSH requires the top of a confined session to be owned by root, which means the directory you land in is deliberately not writable. Create your files one level down. This is the most common surprise on a first connection, and it is not a permissions fault.
| Folder | What it holds | Over SFTP |
|---|---|---|
public_html |
What the web server serves. Your site goes here. | Read and write. |
private |
Anything the web server must not serve: credentials, uploads you hand out through code, a .env file. |
Read and write. |
app |
An application’s own files where the framework keeps them outside the document root. | Read and write. |
tmp |
Scratch space. Nothing here is backed up. | Read and write. |
logs |
The website’s access and error logs. | Read only. The server writes them. |
backups, config, acme |
Backups the panel took, the website’s generated configuration, and certificate material. | Not yours. The panel manages them, and backups and config cannot be opened at all. |
Files you upload arrive readable by you and by the web server’s group, and not by anything else on the machine. You do not need to change permissions after an upload, and making a file world-readable will not help with anything.
Step 3
Give somebody one folder.
Under Extra file transfer accounts, Create account makes a separate login. Leave the folder empty and it reaches the whole website; name a folder and it reaches that and nothing above it. A designer working on a theme needs public_html/wp-content/themes/yours, not the database, not the panel, and not the rest of the site.
The password is generated and shown once. When the work is done, delete the account: that ends the access on its own, without changing anybody else’s password.
The fields
What each input means, and what it refuses.
| Field | What it is for | Limits and refusals |
|---|---|---|
| Name | How you will recognise the account later. Name it after the person or the job. | 1 to 60 characters. Line breaks are refused. |
| Folder | The one folder this account may reach, relative to the website’s own directory. Empty means the whole website. | A plain path such as public_html or public_html/wp-content/uploads. At most 4 levels deep, 200 characters in all, and each part at most 64. Letters, digits, dash, underscore and dot only; each part must start with a letter or digit. No leading or trailing slash, no .., no backslashes. A path needing repair is refused rather than tidied, because somebody who typed one meant something by it. |
| Password | Generated for you when the account is made. You can set your own later. | 12 to 1024 bytes if you set one. Line breaks are refused. It is never stored in a readable form, so a lost password means setting a new one. |
A website may have 20 extra accounts. Each is a real account on the machine, which is why there is a ceiling at all.
What a login cannot do
File transfer only.
These accounts have no shell. A connection that tries to run a command, open a terminal, or forward a port or a socket is refused, and that is set in the SSH policy rather than being a matter of what the account happens to be allowed. So an account you gave somebody to upload a theme cannot be used to reach anything else on the server, including other websites on it.
When it will not connect
Reading the failure.
| What you see | Usually means | What to do |
|---|---|---|
| Permission denied, with the right password | File transfer is not enabled for the website, or the account was deleted. | Check the switch on the File transfer page. Enabling it needs a password set first. |
| Connection refused, or a timeout | The SSH port is not reachable from where you are. | Check the port, and check the firewall if you have narrowed SSH to particular addresses. |
| Permission denied when uploading | You are writing into the folder you landed in rather than one level down. | Change into public_html or private first. |
| The client connects and then disconnects | The client is trying to open a shell or run a command, which these accounts refuse. | Set the client to SFTP rather than SSH or SCP-over-shell. |
Worth knowing
What does not travel.
Moving a customer to another Dashmox server brings their file transfer accounts and the folder each may reach, but not their passwords, which belong to the operating system rather than to the panel. The move names the accounts that need a password set, and the website’s own file transfer stays off until one is.
If you are bringing a whole website across, SFTP is the slow way round. Moving a website over SSH fetches the files and the database together, and shows you what it found before creating anything.
Your servers, with nothing on them counted.
The whole panel is free on one server, with no limit on websites, mailboxes, DNS zones or customer accounts. Pro carries five servers and Business as many as you run.