CoreCP

Files, FTP and SSH

There are three ways to reach the files of your account: the file manager in the panel, an FTP client, and SFTP/SSH with a key. This page covers all three and says which one you want when.

Written for: Customer, Reseller, Administrator

There are three ways to reach the files of your account: the file manager in the panel, an FTP client, and SFTP/SSH with a key. This page covers all three and says which one you want when.

Screenshot — Panel → HostingAccounts → your account → Files, FTP and backups. Screenshots are captured with openwolf designqc into .wolf/designqc-captures/.

What your account looks like

When you sign in you land in your account's home. What is there:

$ ls -la ~
domains/     the web roots of your websites
home/        your personal directory (where FTP lands by default)
backups/     your own backups, if you keep them locally
logs/        the access and error logs of your websites
.ssh/        your SSH keys

A website's files live in domains/<domainname>/public_html. That is the directory you put WordPress or your HTML into.

1. The file manager in the panel

The quickest route for "just one file". Here you can:

ButtonWhat it does
Uploadfiles from your computer into the directory you are in
Downloadfetch a file
New folder / New filean empty directory or an empty text file
Editchange text files right in the browser
Renamea different name, in the same directory
Compress / Extractmake or open a .zip or .tar.gz
Permissionsthe octal permissions of a file, 644 or 755 say
Deletepermanent — there is no recycle bin on the server

Select several rows to compress or delete them in one action. At the top is your disk usage, so you can see how much still fits.

Rule of thumb for permissions: 644 for files, 755 for directories. 777 is never the answer — it is how a compromised plugin also gets to change your other files.

The same actions exist on the command line:

corectl files list   --account web1 --path domains/yoursite.com/public_html
corectl files read   --account web1 --path .env
corectl files mkdir  --account web1 --path uploads
corectl files rename --account web1 --path old.html --to new.html
corectl files chmod  --account web1 --path wp-config.php --mode 640
corectl files compress --account web1 --paths domains --to site.tar.gz --format tar.gz
corectl files extract  --account web1 --path site.tar.gz
corectl files remove   --account web1 --path old-directory --recursive

2. FTP

For moving many files at once an FTP client (FileZilla, Cyberduck, Transmit) is nicer than the browser.

Creating an FTP login

  1. Go to the FTP part and click New FTP login.
  2. Login — the name the client signs in with. An email-shaped name (deploy@yoursite.com) is allowed.
  3. Directory — where this login lands and may not leave. Fill in domains/yoursite.com/public_html, say, if somebody only needs that one website.
  4. Click Create. The password is generated by the server and shown once.
corectl ftp add web1 deploy@yoursite.com --scope domains/yoursite.com/public_html --create-dir
corectl ftp list
corectl ftp passwd deploy@yoursite.com     # new password
corectl ftp remove deploy@yoursite.com     # the login goes, the files stay
corectl ftp status                         # service, certificate and logins

What to fill in in your client

value
Hostyoursite.com (or the server name the panel shows)
Port21
ProtocolFTP with explicit TLS (FTPS)
Userthe login you created
Passwordthe password that was shown once

TLS is mandatory. A client that will not upgrade to TLS is refused — on purpose: plain FTP sends your password across the internet in the clear.

If the panel shows no certificate on the service, report that to your hosting provider; FTPS is then configured but not usable.

3. SFTP and SSH

If your account has SSH access you need no FTP login at all: the same username works over SFTP, on port 22, with your SSH key. That is safer as well as faster than FTP.

Access: off, files only, or shell

The panel has three states (Accounts → your account → SSH):

  • Off — nobody gets in, not even with a key. The keys are kept.
  • Files only (SFTP) — transfer files, run no commands.
  • Shell — a full shell inside this account's environment.
corectl ssh show    --account web1
corectl ssh enable  --account web1              # shell
corectl ssh enable  --account web1 --sftp-only  # files only
corectl ssh disable --account web1              # closed, keys are kept

Adding a key

Passwords do not work for SSH — only keys. Make one on your own computer if you have none yet:

ssh-keygen -t ed25519 -C "Anna's laptop"
cat ~/.ssh/id_ed25519.pub

Paste that single line (it starts with ssh-ed25519) into the panel under Public key, give it a label that tells you where it lives, and click Add key. Under Advanced you can restrict it to one IP address or range.

The private key stays on your own computer. You never share it, with anybody.

# on the server
corectl sshkey add --account web1 --label "Anna's laptop" < ~/.ssh/id_ed25519.pub
corectl sshkey list --account web1
corectl sshkey remove --account web1 --label "Anna's laptop"

Connecting

sftp web1@yoursite.com         # files
ssh  web1@yoursite.com         # shell

# handy: synchronise a whole directory
rsync -avz --delete ./site/ web1@yoursite.com:domains/yoursite.com/public_html/

Which do you use when?

SituationTake
Changing one small filethe file manager in the panel
Uploading a websiteSFTP, or FTP if your client cannot do SFTP
Giving an outside party temporary access to one directoryan FTP login with a Directory
A deploy scriptSFTP/rsync with a key
Running something on the serverthe web terminal, or SSH with a shell

When something is not right

What you seeWhat it usually is
FTP: "530 Login incorrect"Wrong password, or the login was removed. Generate a new password.
FTP: the connection drops after signing inPassive mode is off in your client. Turn it on.
FTP: "TLS required"Your client is on plain FTP. Choose FTP with explicit TLS.
SSH: "Permission denied (publickey)"The key is not there, or SSH is off for this account.
SSH connects but commands do nothingThe account is on files only. Set it to Shell.
Your site returns 403 after an uploadPermissions. Files to 644, directories to 755.
"This directory is empty" while there are filesYou are in the home, not in the web root. Go to domains/<domain>/public_html.

See also

  • The web terminal — the same shell, without a client, in your browser.
  • Your own backups — before you throw something big away.
  • Securing your account — why a key beats a password.