There was a problem loading the comments.

User Guide - FTP User Guide

Support Portal  »  Knowledgebase  »  Viewing Article

  Print

Applicable plans - all eApps General VPS plans

User Guide - FTP (File Transfer Protocol)

This User Guide will walk you through the very basic setup to start using FTP to connect to your eApps VPS. eApps uses the ProFTPD server, which is a highly configurable GPL-licensed FTP server. The site for ProFTPD, with all supporting documentation, is here - http://www.proftpd.org

Overview

FTP is used to connect to the home directory of a web site as the Admin user of that site. Use FTP to manage the files in the DocumentRoot of a site or the home directory of the Admin user for a site.

You cannot use FTP to connect as the ‘root’ user, and you cannot use FTP to connect to any part of the VPS outside of the basic home directories for the Admin users of the sites. If you need to upload WAR or EAR files or any other files to the Tomcat, JBoss or Glassfish directories, you will need to use SFTP. Using SFTP is covered in the SFTP User Guide


Installing ProFTPD

FTP User and Password 
FTP Client Configuration
Restricting an FTP User to Their Home Directory (chroot jail)

Restarting the FTP server

Links to other information

Installing ProFTPD

Warning The ProFTPD server is not installed on your VPS by default, because eApps would prefer that you use the more secure SFTP protocol instead. However, if you want to use FTP, this User Guide has the basic information. 

Login to your Control Panel, and click on the System Tab. If necessary, click the Select Another System (Subscription) link on the left and choose the correct Virtuozzo container.

If you are not sure if ProFTPD is installed, go to Applications, and click on All Applications. If you see Proftpd in the list, then the application is installed, and you can skip the next steps. If you do not see Proftpd in the list, please continue with the next steps.

Go to Applications, and click on the Add Application link. Select the box next to Proftpd, and then scroll down and click the Next button.

This takes you back to the All Applications screen. Wait for five minutes, then click on the Refresh link at the upper right, just under the word Parallels. The application should now show as installed. If it is still in a Scheduled state, wait another five minutes, and click Refresh again. If you see it in Error state, or it still shows as Scheduled, please contact eApps Technical Support.



FTP User and Password 

To connect to your VPS using FTP, you need to determine which user is the Admin user for the site you are trying to upload files for. Then you have to set the password for that user (if not already known), and then connect.

How to determine which user to connect with`

From the Control Panel, click on the Site Tab, and if necessary click the Select Another Site link on the left, and choose the correct site.

Once that site shows as the site name in the Site Tab, then click on the Website Settings link.

Look at the Admin username section under the General listing. This is the user that you need to connect as to manage the files for the site listed on the Site Tab. The DocumentRoot section shows where the files need to be uploaded to.


Remember that if you are trying to manage files for Tomcat or JBoss, you will need to use SFTP, not FTP.

Tech tip If you create a new user, and connect as that user, you will only have access to the files in that user's home directory. Only the Admin user for a site has access to the files for that site! This is very important to understand, and is probably the source of the most confusion regarding how to use FTP - only the Admin user for a site has access to the files in the DocumentRoot for that site.

How to set the password for the Admin user for a site

If you do not recall the password that was set for the Admin user when the site was created, or if you want to change the password, follow these steps:

From the Control Panel, click on the System Tab.  If necessary, click the Select Another System (Subscription) link on the left and choose the correct Virtuozzo container.

 Scroll down to the FTP Management section, and click on FTP Accounts.

Then, click on the Admin user you need to set or change the password for. In the Password field, enter the new password, and then enter it again in the Re-enter password field. Note that the password must be a minimum of six characters, and must contain letters, numbers and special characters, such as @#$%.


Once you have determined the correct Admin user for a site, and set or changed the password, you can now connect to your site using the FTP client of your choice.


FTP Client Configuration

There are dozens of FTP clients, both free and not free, command line and GUI, for all operating systems. See this page for a comparison of FTP client software -  http://en.wikipedia.org/wiki/Comparison_of_FTP_clients

Note Because of the large number of FTP clients available, it is not possible for eApps to offer support for any FTP client beyond the most basic of configuration questions. It is up to the user to read all documentation and to fully understand how their FTP client  works.

As a courtesy, here are the basic settings for the FTP clients that our customers most often ask about: Filezilla for Windows, Linux and Mac OS X 10.5 or newer, and CyberDuck for Mac OS X 10.4 or newer.

Both of these FTP clients are free and open-source, and are highly configurable and can also be used as SFTP clients.

 Filezilla

 Filezilla can be downloaded from a link on the Filezilla projet website – http://filezilla-project.org/. Once it is installed, here are the basic settings to use to connect to your VPS with the Admin user and password for the site.

This explains how to use the Quickconnect bar. If you do not see the Quickconnect bar, click on View, and make sure there is a check mark by Quickconnect bar in the menu.

  • Host – the name of your site or VPS in the format of example.com
  • Username – the Admin user of the site
  • Password – the password for the Admin user
  • Port – 21
  • Click on the Quickconnect button to connect

If you have set up the Filezilla client correctly, but are unable to connect to your VPS using FTP, please contact eApps Support so that we can verify that your FTP server is working as it should. If you have further questions about using the Filezilla client beyond what is covered here, please read the official Filezilla Documentation or visit the Filezilla support forums for more information.

Cyberduck

Cyberduck for Mac OS X 10.4 or better can be downloaded from a link on the Cyberduck website – http://cyberduck.ch/. Once it is installed, here are the basic settings to us to connect to your eApps VPS with Admin user and password for the site.
  • Click on Open Connection
  • Protocol – select FTP(File Transfer Protocol) from the drop down list
  • Server – enter the name of your site or VPS in the format of example.com
  • Port – it should be set to 21
  • Username – the Admin user for the site
  • Password – the password for that user
  • Click Connect to connect to the site using FTP.

If you have set up the Cyberduck FTP client correctly, but are unable to connect to your VPS using FTP, please contact eApps Support so that we can verify that your FTP server is working as it should. If you have further questions about using the Cyberduck FTP client beyond what is covered here, please read the official Cyberduck Documentation or visit the Cyberduck support forums for more information.


Restricting an FTP User to Their Home Directory (chroot jail)

For customers running the CentOS 4 or Fedora Core 1 operating system, the following procedure can be used to restrict an FTP user to their home directory.

For customers who are on plans running the CentOS 5 operating system, any FTP users that you create will automatically be restricted to their home directory. You do not have to do any of the steps below.


Tech tip To see what operating system (OS) you have, click on the Subscriptions icon from the My Account tab of your Control Panel. Then click on the name of the subscription you want to see. The OS for the subscription will be displayed near the top of the page

Chroot 

Chroot  allows you to create a home directory for your FTP users, where the permissions on the directory are such that the user will only see the files in their home directory.  In other words they will be "jailed" to their home directory, thus not allowing them to browse anything else outside that directory, such as configuration files, data files or other user's home directory.

Creating a chroot jailed user

To create a chroot jail for an FTP user, the ProFTPD configuration file has to be edited, and a line added for each user that you want to chroot. The ProFTPD configuration file can either be edited from the Control Panel or the command line.

For this example, the webadmin user is going to restricted to the /home/webadmin directory.

The ProFTPD configuration file is called proftpd.conf, and is located in the /etc directory.

Control Panel

To edit this file from the Control Panel, click on the System Tab.  If necessary, click the Select Another System (Subscription) link on the left and choose the correct Virtuozzo container.

Then click on File Manager, and navigate to the etc directory off the main root directory of the file system.
Check the box next to the proftpd.conf file (you may have to scroll more than one page or screen to see it), and then click on Edit. Look for this section, near the very bottom of the file:

# Default root can be used to put users in a chroot environment.
# As an example if you have a user foo and you want to put foo in /home/foo
# chroot environment you would do this:

# DefaultRoot /home/foo foo

and add this line just below the DefaultRoot /home/foo foo line

DefaultRoot  /home/webadmin  webadmin


After editing the file, click on OK to save the changes. Restart the ProFTPD server using the Control Panel instructions from the  Restarting the FTP Server section of this User Guide.

Command line

To edit the /etc/proftpd.conf file from the command line, you will need to login to the VPS using SSH, as the root user. For more information on SSH, see the SSH User Guide.

[root@example ~]#
[root@example ~]# cd /etc/
[root@example etc]# cp proftpd.conf{,.bck}
[root@example etc]# vi proftpd.conf

Edit the proftpd.conf file using the vi editor. Find this section of the file (near the bottom of the file):

# Default root can be used to put users in a chroot environment.
# As an example if you have a user foo and you want to put foo in /home/foo
# chroot environment you would do this:

# DefaultRoot /home/foo foo

and add this line just below the DefaultRoot /home/foo foo line

DefaultRoot  /home/webadmin  webadmin

Save and exit the file, and then restart ProFTPD using either the Control Panel or Command Line methods in the Restarting the FTP Server section of this User Guide.

Restarting the FTP server

The ProfFTPD server can be restarted from either the Control Panel, or the command line of the VPS.

Control Panel

To restart the FTP server from the Control Panel, follow these steps. Depending on how the FTP server is installed, there may be an extra step involved.
From the Control Panel, click on the System Tab.  If necessary, click the Select Another System (Subscription) link on the left and choose the correct Virtuozzo container.

Click on the FTP Server link in Server Management and then click on Restart. If you are returned back to this same screen, then the FTP server has been restarted. If this works, then your FTP server is set to run in what is referred to as standalone mode.

If you get an error that looks similar to the following:

Technical Problem Occured
Problem ID p2009-01-15_13-54-22 (this is the date and time of the error)
What Can I Do?
Contact Technical Support Team

Then click back on the System Tab to refresh the screen, and go to Service Management  - Services. Scroll down the list to find the xinetd service,  and click on it. You will be able to Stop or Restart the xinetd service there. If you have to take this step, then your FTP server is set to run in what is referred to as xinetd mode.

The ProFTPD server on most new CentOS 5 VPSs is set to xinetd mode by default.

Command Line

To restart the ProFTPD server from the command line, follow these steps.  These steps assume you are logged in to the VPS via SSH as the root user. See the SSH User Guide for more information if needed.

[root@example etc]# service proftpd restart
Shutting down proftpd:                                     [ OK ]
Starting proftpd:                                          [ OK ]
[root@example etc]#

If you get the following error:

[root@example etc]# service proftpd restart
proftpd: unrecognized service
[root@example etc]#

then use this method to restart ProFTPD:

[root@example etc]# service xinetd restart
Stopping xinetd:                                           [  OK  ]
Starting xinetd:                                           [  OK  ]
[root@example etc]#

Just as with the Control Panel, the first method works if the ProFTPD server is set to run standalone. The second method works if the ProFTPD server is set to run as an xinetd service. Most CentOS 5 VPSs have ProFTPD set to run as xinetd.


Links to other information

ProFTPD official documentation - http://www.proftpd.org/docs/
ProFTPD forums - http://forums.proftpd.org/smf/
ProFTPD Howto index - http://www.proftpd.org/docs/howto/index.html

Share via
Did you find this article useful?  

Related Articles


On-Premise Help Desk Software by SupportPal

Categories

© Cloudscale365