This article provides the steps necessary to add an FTP account to a server running cPanel.To add an FTP account to cPanel, follow the steps below.
- Log into the cPanel interface for the domain. This is typically https://<server_name>:2083. Accept the self-signed certificate if prompted. If you are not sure of the login credentials, you may also get into the site via WHM by going to https://<server_name>:2087, accept the self-signed certificate if prompted, scroll down to Account Information > List Accounts and then click the cPanel icon next to the domain in question. Doing so will automatically log you into the cPanel interface for that domain.
- Once logged into the cPanel interface for the domain, navigate to Files > FTP Accounts.
- Enter in the username, secure password, and directory. By default, the directory will be /home/username/<whatever_you_specify>. You may also choose to add a quota for the user. Click Create FTP Account and the user is created and is available for immediate use. If for any reason you need to have the user to have access to something other than is what is listed for a home directory, modifications will need to be done via SSH manually. To do this, log into the server via SSH and edit /etc/proftpd/<ftp_username> and change the path (assuming ProFTP is the FTP server). This change will NOT be reflected in the cPanel interface.
- You can now connect via FTP. If for any reason you cannot, there may be a hardware firewall blocking the request. Alternative, try turning off iptables on the server or add the following lines to iptables:
-A INPUT -p tcp -m state --state NEW -m tcp --dport 20 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 21 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 990 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 30000:50000 -j ACCEPT #the passive ports listed in /etc/pure-ftpd.conf
- You will also need to SSH in and edit /etc/pure-ftpd.conf to uncomment the following line:
# Port range for passive connections replies. - for firewalling. PassivePortRange 30000 50000
- Then restart the FTP Server (ProFTPd/PureFTPd) service via WHM. It is recommended to use domain.com rather than ftp.domain.com. If you haven't already added the domain to our nameservers, please submit a ticket via the customer portal with the domain and external IP address and it can be added to the Edge Hosting nameservers.