How to Create FTP/SFTP Accounts in Your WebhostingM cPanel Print

  • cPanel UAPI, FTP Accounts, SFTP
  • 0

Imagine transferring sensitive website data like login credentials or customer information. Regular FTP (File Transfer Protocol) might send shivers down your spine! This is where SFTP (Secure File Transfer Protocol) steps in, offering a safe and encrypted connection for transferring your website's files. As a cPanel user, you can easily create and manage SFTP accounts within your control panel interface. In this guide, we will walk you through setting up SFTP accounts in cPanel.

Why Use SFTP?

  • Enhanced Security: SFTP encrypts data transfer, protecting your files from unauthorized access during the upload or download process. Think of it as a secure tunnel for your website's data.

  • Peace of Mind: With SFTP, you can upload confidential information or manage core website files with confidence, knowing they're shielded from prying eyes.

  • Industry Standard: SFTP is the preferred method for transferring website files due to its robust security features. By using SFTP, you're adhering to best practices.

 

Creating and Managing SFTP Accounts in cPanel

  1. Log in to your cPanel interface.

  2. Navigate to the "Files" section and click on "FTP Accounts." This is where the SFTP account magic happens!

  3. Click on "Create FTP Account" to set up a new SFTP user.

  4. Choose a username and password for the SFTP account. Remember, strong passwords are crucial for maintaining security. Don't hesitate to use the "Password Generator" for a complex password suggestion.

  5. Define the SFTP account's home directory. This is the specific folder structure within your website that the SFTP user will have access to. By default, cPanel suggests a directory based on the username and domain.

  6. Set a disk space quota (optional). This limits the amount of storage the SFTP user can consume on your website's server. If unsure, leave it unlimited for now.

  7. Click "Create FTP Account" to finalize the process. The newly created SFTP account will appear in the "FTP Accounts" table.

 

Managing Existing SFTP Accounts

  • Change Password: Click "Change Password" next to the desired account and update the login credentials.

  • Modify Quota: Click "Change Quota" to adjust the disk space limit for a specific SFTP user.

  • Delete Account: Use this option with caution! Choose "Delete Account" to remove only the user, or "Delete Account and Files" to eliminate both the user and their associated files (use this option with extreme care!).

 

cPanel API for FTP/SFTP Account Management

This table provides an overview of WHM's uAPI (User API) commands for managing FTP/SFTP accounts on a cPanel server:

Command Description

uapi --output=jsonpretty Ftp list_ftp

Lists all FTP accounts on the server.

uapi --output=jsonpretty Ftp ftp_exists user='us_chickens'

Checks if a specific FTP account exists (replace 'us_chickens' with the actual username).

uapi --output=jsonpretty Ftp add_ftp user='username2' pass='123456luggage'

Creates a new FTP account. Replace 'username2' and '123456luggage' with your desired username and password.

uapi --output=jsonpretty Ftp delete_ftp user='username2'

Deletes an existing FTP account (replace 'username2' with the actual username).

uapi --output=jsonpretty Ftp passwd user='ftpaccount' pass='123456luggage'

Updates the password for an existing FTP account (replace 'ftpaccount' and '123456luggage' with the actual username and desired password).

uapi --output=jsonpretty Ftp set_homedir user='example1'

Updates the home directory for an existing FTP account (replace 'example1' with the actual username).

uapi --output=jsonpretty Ftp set_quota user='ftpaccount'

Updates the quota (storage limit) for an existing FTP account (replace 'ftpaccount' with the actual username).

Note: Remember to replace placeholders like 'username2', 'ftpaccount', and '123456luggage' with your actual usernames, passwords, and desired quota settings when using these commands.

By leveraging SFTP accounts, you ensure the secure transfer of your website's files, safeguarding sensitive information and maintaining peace of mind. Remember, a secure website is a happy website (and a happy website owner)!

 

WebHostingM Support

If you encounter any difficulties while creating or managing SFTP accounts in cPanel, WebHostingM's support team is here to help! You can contact our support team for personalized assistance.


Did this answer help?

« Back

Trusted by over 35,000 customers in over 200 countries