Accessing a storage

Accessing a storage

When you create a storage you obtain a Server Hostname, Username and a Password. Note that at any time you can view and edit your storage credentials one the Services/Storages page.

You have 6 possible ways how to access your storage.

  • FTP - File Transfer Protocol
  • FTPS - FTP encrypted with SSL encyption
  • SFTP - FTP over (encrypted) SSH protocol
  • RSYNC - a file-copying tool over (encrypted) SSH protocol
  • HTTPS API - REST API over (encrypted) HTTPS protocol
  • Web File Manager - an implementation of the HTTPS API in our CDN dashboard

FileZilla FTP example

  • Download and install FileZilla.
  • Fill in Host (Server Hostname), Username and Password as in the picture below.
    FileZilla Connect
  • Click on the "Quickconnect" button and that's all.

Note that all FTP clients are supported: FileZilla, WinSCP, NcFTP, LFTP, etc.

Please note that you have to upload your content to the public directory (created by CDNsun) on your storage because CDN services pull content only from the public directory and it's subdirectories (possibly created by you).

To connect and transfer files over FTPS you need to configure your FTP client to run over SSL encrypted FTP protocol. Please note that your FTP client may ask you to accept/trust our SSL certificate.

Web File Manager

On the Services/Storages page click on the label of your storage and you will reach the file manager page as in the picture below.

File Manager

Other examples

FTP(S): ncftp -u "Username" "Server Hostname" and "cd public"
SFTP: sftp "Username"@"Server Hostname" and "cd public"
RSYNC: rsync -a myimage.jpeg "Username"@"Server Hostname":/public/
API:curl --insecure --user "Username":"Password" --include --request PUT --header 'Accept: application/json' --url https://"Server Hostname"/content?path=/dir/file --upload-file /path/to/your/local/file

Files are case-sensitive and have permissions

Please note that all files on your CDN Storage are case-sensitive. For example image.jpg and Image.jpg are two different files.

Make sure that your files have correct permissions. Others must have read permission to your files otherwise the CDN Storage will not be able to serve your files correctly (it will return 403 Forbidden). In octal notation we recommend to set 755 permissions (rwxr-xr-x) for your directories and 644 permissions (rw-r--r--) for your files.

Security recommendations

Use encrypted connections for uploads

If you are accessing your storage over pure FTP protocol then please note that your username and your password are being sent in a plain text from your FTP client over the Internet to the storage server. It is a security risk. Fortunately most of the nowadays FTP clients support encrypted connections (FTPS) so we recommend to enable this feature to eliminate the risk.

Use public key instead of password

This applies to SFTP and RSYNC only. You can authenticate to your storage with a public key instead of a password. To upload your public key to your storage please follow these steps.

  • Go to Services → Storages → Settings.
  • Paste your public key as in the picture below.
    Authorized keys
  • Click on the Upload Authorized Keys button and that's all. Now you can authenticate to your storage with your public key.

Please note that your public key has to be in the OpenSSH format. To generate your public and private key pair in Linux you can use the ssh-keygen command, in Windows you can use the PuTTYgen utility from the PuTTY website.

What next?

Create a CDN Static Push or a CDN Video Push service.

Contact Us

  ______     ___              
 /_   _//   / _ \\    ____    
 `-| |,-   / //\ \\  |    \\  
   | ||   |  ___  || | [] ||  
   |_||   |_||  |_|| |  __//  
   `-`'   `-`   `-`  |_|`-`   
                     `-`