Subdomains and Addon domains allow to have separate sites on same hosting account. Generally all cPanel hosting companies restricts one primary domain to be attached to one account level. But they allow adding additional sites through addon domains to the primary hosting account. You can also create separate sites by creating subdomains under your main domain name. FTP is the file transfer protocol allows people to access the files stored on the server remotely. Generally the FTP account allows you to access all the files on the server including subdomains and addon domains. In this article we will explain how to create FTP account for subdomain and addon domain in cPanel.
Why Do I Need FTP for Folders?
There are many situations you may need to provide FTP account to third parties. Let us take an example, you are purchasing a plugin and installing it on one of your addon domain. The plugin does not work and the developer is asking you to provide FTP access to debug and troubleshoot. In this situation, you should not provide your FTP account having access to entire server files. You should create a new FTP account only having access to the required addon domain and send to the developer.
The example is managing multi-user network sites under single hosting account. The larger network of sites are managed by a single network admin with different people handling different subdomains. In this case also, network admin should provide FTP access to people only for the subdomain they are responsible for and not to the entire site files.
How to Create FTP Account for Folders?
Whether it is a subdomain or addon domain, each site on a hosting accounting is considered as a different folder. This makes it easy to provide access to individual folder without having visibility to other folders. The process of creating FTP account for folder is similar to creating a general FTP account.
Login to your hosting account and navigate to cPanel section. Look for the “FTP Accounts” icon as shown below:
Click on the “FTP Accounts” or equivalent icon to open FTP account creation screen.
- Enter login id for accessing the folder and ensure to select the subdomain or addon domain from the dropdown box.
- Enter password
- Ensure the correct folder name is entered
- Provide the quota size
- Create FTP account
For example, if your subdomain name is “blog” and the login id is “subdomain” then the FTP account details should be like below:
Checking the FTP Access
Once the FTP account is created, login to your FTP client like FileZilla and configure the site manager with the above details. Ensure to use the host as subdomain name and not the main domain name.
This will restrict the access only to the chosen folder (subdomain or addon domain) and will not allow the user to view other folders and files.
Be careful when deleting the FTP accounts. Generally you will see two options – one is to delete the account and other is to delete account along with all files. You need to always delete only the FTP account and not the files. If you wrongly choose the delete account and files button then all files (which means the entire site files on that folder) will be deleted. Users will be seeing 500 internal server error if the folder or files are deleted. Unless you or your host have backup of the folder, there is no way to restore the content. The database content will be there as it is stored on MySQL tables separately outside the folder.