Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Remote Access Services Administrator's Guide: HP-UX 11i v2, HP-UX 11i v3 > Chapter 2 Configuring FTP

Virtual FTP Support

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

Virtual FTP support allows you to manage an FTP server for multiple domains on the same machine.

Virtual FTP allows an administrator to configure a system to display a different banner, log file, and directory to a user when the user is connected to different domains on the same system. The advantage of virtual FTP support is that the identity of the machine is hidden. Also, this feature allows a single machine to act as multiple FTP servers for multiple domains.

Figure 2-2 shows a graphical representation of an FTP server, ftp.domain.com, hosting two virtual domains, ftp.animals.com and ftp.flowers.com.

Figure 2-2 Structure of an FTP Server Hosting Two Virtual Domains

Structure of an FTP Server Hosting Two Virtual Domains

In Figure 2-2, a user connected to the FTP server ftp.domain.com through the domain ftp.animals.com receives a different banner and directory than a user who is connected to the same server through the domain ftp.flowers.com.

Setting up Virtual FTP Support

The configuration file /etc/ftpd/ftpservers contains a set of virtual domain names that the FTPD server can use for each virtual domain. Using the virtual domain name, you can define the FTP configuration files ftpaccess, ftpusers, ftpgroups, ftphosts, and ftpconversion files on a per-domain basis. Create a directory in the /etc/ftpd directory with a name similar to the virtual domain name, and copy the FTP configuration files to that directory. If you do not want to place a copy of one or all the FTP configuration files in the virtual host directory for any host, you can use the master copy.

NOTE: A sample configuration file exists in the /usr/newconfig/etc/ftpd/examples directory.

Example 2-15  /etc/ftpd/ftpserver Configuration File Entry

The following example shows a possible entry in the /etc/ftpd/ftpservers configuration file:

123.123.123.123       /etc/ftpd/somedomain

In this example, when an FTP client connects to the server using the IP address 123.123.123.123, the FTPD server searches for the configuration files ftpaccess, ftphosts, ftpusers, ftpgroups, and ftpconversions under the directory /etc/ftpd/somedomain. If a match is not found or an invalid directory path is encountered, the default master configuration files in directory /etc/ftpd are used instead.

Support for Virtual FTP

Virtual FTP can be supported in two ways:

  • Without the ftpservers( 4) file - By using the master /etc/ftpd/ftpaccess configuration file. For more information, see “Without ftpservers (4) File.

  • With the ftpservers( 4) file- By using the virtual domain's ftpaccess configuration file. For more information, see “With ftpservers (4) File”

Without ftpservers (4) File

WU-FTP 2.6.1 supports the following directives for Virtual FTP support in the master /etc/ftpd/ftpaccess configuration file:

  • virtual address allow username [ username ... ]

  • virtual address deny username [ username ... ]

  • virtual address private

  • virtual address { root|banner|logfile } path

  • virtual address { hostname|email } string

  • virtual address incmail emailaddress

  • virtual address mailfrom emailaddress

Usage

This section describes the functionality of the various directives.

The “virtual address allow username” and “virtual address deny username” directives

These directives are is used to allow or deny real and guest users. They can be used in the /etc/ftpd/ftpaccess file as well as the virtual domain specific ftpaccess file.

virtual address allow username [ username ... ]
virtual address deny username [ username ... ]
The “virtual address private” directive

This directive is used to deny anonymous FTP login. By default, anonymous users are allowed to log in a virtual FTP setup.

virtual address private
The “virtual address root path” and “virtual address banner path” directives

These directives are used to display the banner message and are used in the /etc/ftpd/ftpacess file.

virtual address root path
virtual address banner path
NOTE: The virtual address root path directive must be mentioned for the

virtual address banner path directive to work. This directive is additionally required to allow anonymous FTP access in a virtual FTP setup.

The virtual address banner path directive must be used only in the /etc/ftpd/ftpaccess file and not in the virtual domain's ftpaccess file. The above directive overrides the banner path directive. If the master /etc/ftpd/ftpaccess configuration file has banner path directive but not virtual address banner path directive, the

banner path directive does not have any effect on the behavior of the ftpd( 1M) daemon.

The virtual address root path directive can also be used in conjunction with the

virtual address email string directive.

For more information, see “The “virtual address root path” and “virtual address email string” directives.

The “virtual address logfile path” directive

This directive is used to change the file where all the logging information of ftpd( 1M) must be written. This directive is used in the /etc/ftpd/ftpaccess file.

NOTE: The virtual address logfile path directive does not require the

virtual address root directive. This directive overrides the logfile path directive. If the /etc/ftpd/ftpaccess file has the logfile path directive but does not have the

virtual address logfile path directive, then the logfile path directive does not affect the behavior of the ftpd( 1M) daemon.

The “virtual address hostname string” directive

This directive is used to change the default hostname of the FTP server. This directive is used in the /etc/ftpd/ftpaccess file.

NOTE: The virtual address hostname string directive does not require the

virtual address root directive. This directive overrides the hostname string directive. If the /etc/ftpd/ftpaccess file has the hostname string directive but does not have the virtual address hostname string directive, then the hostname string directive does not affect the behavior of the ftpd( IM) daemon. If both the

virtual address hostname string directive and the hostname string directive are present in the /etc/ftpd/ftpaccess file, then the virtual address hostname string directive does not affect the behavior of the ftpd( 1M) daemon.

The “virtual address root path” and “virtual address email string” directives

These directives are used to change the email address of the FTP archive maintainer. These directives are used in the /etc/ftpd/ftpaccess file.

NOTE: The virtual address root path directive must be mentioned for the

virtual address email string directive to work. This directive overrides the

email string directive. If the /etc/ftpd/ftpaccess file has the email string directive but does not have the virtual address email string directive, then the email string directive does not affect the behavior of the ftpd( 1M) daemon. If both

virtual address email string and email string directives are present in the /etc/ftpd/ftpaccess file, then virtual address email string has precedence over the email string directive.

The “virtual address incmail emailaddress” directive

This directive is used to change the email address for anonymous upload notifications. This directive is used in the /etc/ftpd/ftpaccess file.

NOTE: The virtual address incmail emailaddress directive does not require the virtual address root path directive. This directive overrides the

incmail emailaddress directive. If the master /etc/ftpd/ftpaccess configuration file has the incmail emailaddress directive but does not have the

virtual address incmail emailaddress directive, then the

incmail emailaddress directive does not affect the behavior of the ftpd( 1M) daemon.

The “virtual address mailfrom emailaddress” directive

This directive is used to change the sender's email address for anonymous upload notifications. This directive is used in the /etc/ftpd/ftpaccess file.

NOTE: The virtual address mailfrom emailaddress directive does not require the virtual address root path directive. This directive overrides the

mailfrom emailaddress directive. If the master /etc/ftpd/ftpaccess configuration file has the mailfrom emailaddress directive but does not have the

virtual address mailfrom emailaddress directive, then the mailfrom emailaddress directive does not affect the behavior of the ftpd( 1M) daemon.

With ftpservers (4) File

Use the following directives to achieve the configurations described in “Without ftpservers (4) File”:

  • virtual address allow username [ username ... ]

  • virtual address deny username [ username ... ]

  • virtual address private

  • root path

  • banner path

  • logfile path

  • hostname string

  • email string

  • incmail emailaddress

  • mailfrom emailaddress

Usage

This section describes the functionality of the various directives.

The “virtual address allow username” and “virtual address deny username” directives

These directives are used to allow or deny real and guest users to log in a virtual FTP setup. These directives can also be used in the master /etc/ftpd/ftpaccess file.

The “virtual address private” directive

This directive is used to deny anonymous access to virtual FTP setup. This directive can also be used in the master /etc/ftpd/ftpaccess file.

The “root path” directive

This directive is used to allow anonymous FTP access in a virtual FTP setup.

The “banner path” directive

This directive is used to display the banner message. This directive is used in the /etc/ftpd/ftpacess file.

NOTE: Do not use the virtual address banner path directive in the virtual domain's ftpaccess file as it will not have any effect.
The “logfile path” directive

This directive is used to change the path of the xferlog( 4) file. This directive is used in the /etc/ftpd/ftpaccess file.

NOTE: Do not use the virtual address logfile path in the virtual domain's ftpaccess file as it will not have any effect.
The “hostname some.host.name” directive

This directive is used to change the hostname string. This directive is used in the /etc/ftpd/ftpaccess file.

NOTE: Do not use the virtual address hostname some.host.name directive in the virtual domain's ftpaccess file as it will not have any effect.
The “email emailaddress” directive

This directive is used to change the email address of the FTP archive maintainer. This directive is used in the /etc/ftpd/ftpaccess file.

NOTE: Do not use the virtual address email emailaddress directive in the virtual domain's ftpaccess file as it will not have any effect.
The “incmail emailaddress” directive

This directive is used to change the email address for anonymous upload notifications. This directive is used in the /etc/ftpd/ftpaccess file.

NOTE: Do not use the virtual address incmail emailaddress directive in the virtual domain's ftpaccess file as it will not have any effect.
The “mailfrom emailaddress” directive

This directive is used to change the sender's email address for anonymous upload notifications. This directive is used in the /etc/ftpd/ftpaccess file.

NOTE: Do not use the virtual address mailfrom emailaddress directive in the virtual domain's ftpaccess file as it will not have any effect.

Setting up a Virtual FTP Server

The steps to set up a virtual FTP server are as follows:

  1. Set up an IP alias for the FTP server machine using theifconfig command. For example:

    ifconfig lan0:1 15.70.178.100 netmask 0xffffff00 up

    The IP address 15.70.178.100 is set as an alias to the interface lan0. Now you can access the FTP server machine with lan0 as the interface, with the IP address 15.70.178.100.

  2. Declare the following directives in the /etc/ftpd/ftpaccess file:

    virtual 15.70.178.100 root/virtual
    virtual 15.70.178.100 banner / virtual/banner.msg
    virtual 15.70.178.100 logfile / virtual/xferlog
  3. Create the directory /virtual and the files banner.msg and xferlog under the /virtual directory.

  4. Log in as an anonymous user on the virtual FTP server (that is, ftp 15.70.178.100). The banner.msg file displays from the /virtual directory.

The root directory of the anonymous user is changed to the directory as specified in the virtual IP address root entry in the /etc/ftpd/ftpaccess file. For example:

virtual 15.70.178.100 root/virtual

In this example, the root directory of the anonymous user is changed to the /virtual directory.

You must ensure that the files referenced after changing the root directory exist in the virtual server (similar to the scenario for setting up an anonymous account).

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© Hewlett-Packard Development Company, L.P.