Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
43.  Administering the FTP Server (Tasks) Starting the FTP Server Automatically How to Start an FTP Server From inetd.conf  Previous   Contents   Next 
   
 

Starting a Standalone FTP Server

The FTP server can also be run independently of the inetd.conf as a standalone server.

A standalone server always has the quickest possible response time, and is intended for large servers that are dedicated to providing FTP service. The standalone server provides low connection latency for dedicated servers because the standalone system never has to be restarted. The standalone server is always running--even during off-peak hours--waiting indefinitely for connections.

How to Start a Standalone FTP Server

  1. Become superuser.

  2. Add a # sign at the start of the ftp service line in the inetd.conf file to comment out the entry.

  3. Signal inetd to reread the inetd.conf file.

    # pkill -HUP inetd
     
  4. Start the standalone FTP server.

    # /usr/sbin/in.ftpd -a -S

    Add the line to an FTP server startup script. See "Run Control Scripts" in System Administration Guide, Volume 1 for information on creating a system startup script.

Shutting Down the FTP Server

The ftpshut(1M) command closes down the FTP server at a particular time.

When you run ftpshut, a file is generated from command-line options that specify when shutdown occurs, the point at which new connections are refused, and when existing connections are dropped. Users are notified of a server shutdown based on this information. The location of the file that is created by ftpshut is specified by the shutdown directive in the ftpaccess file.

How to Shut Down the FTP Server

Follow the steps in this procedure to run ftpshut and to add the shutdown directive to the ftpaccess file.

  1. Become superuser.

  2. Add the following entries to the ftpaccess file.

    shutdown path

    shutdown

    Keyword that is used to specify the path to a file that is checked regularly for whether the FTP server is scheduled to be shut down

    path

    Location of the file that was created by ftpshut command

  3. Run the ftpshut command.

    ftpshut [ -V ] [ -l min] [ -d min] time [warning-message...]

    ftpshut

    Command that provides a procedure for notifying users that the FTP server is shutting down.

    -V

    Option that is specified to display copyright and version information, then terminate

    -l

    Flag that is used to adjust the time that new connections to the FTP server are denied

    -d

    Flag that is used to adjust the time that existing connections to the FTP server are disconnected.

    time

    Shutdown time that is specified by the word now for immediate shutdown, or in one of two formats (+ number or HHMM) for a future shutdown

    [warning-message...]

    Shutdown notification message

  4. Use the ftprestart command to restart the FTP server after shutdown.

    For further information, see ftpshut(1M), ftpaccess(4), and ftprestart(1M).

Debugging the FTP Server

This section describes some of the ways to debug problems with the FTP server.

How to Check syslogd for FTP Server Messages

The FTP server writes messages that are useful for debugging to the location that is specified for daemon messages in the /etc/syslog.conf file. If a problem occurs with the FTP server, check this file first for such messages.

The FTP server messages are controlled by facility daemon and level information. To send messages from the FTP server to /var/adm/message and have syslogd reread its configuration file, follow these instructions:

  1. Add an entry such as the following to the /etc/syslog.conf file.

    daemon.info /var/adm/message
  2. Signal syslogd to reread its configuration file.

    # pkill -HUP syslogd

    This action causes informational messages from the FTP Sever to be written to /var/adm/messages.

How to Use greeting text to Verify ftpaccess

To use the greeting text capability to check that the correct ftpaccess file is being used, do the following:

  1. Add the following directive to the ftpaccess file.

    greeting text message
  2. Connect to the FTP server.

  3. If the message fails to appear, do the following:

    1. Confirm that the ftpaccess file is in the correct location. Use the strings(1) command to obtain the location of the file from the FTP server binary.

      # strings /usr/sbin/in.ftpd | grep "^/.*ftpaccess"
    2. Check the ftpservers file to see if virtual hosting has been configured.

      For further information, see ftpaccess(4), ftpservers(4), strings(1), syslog.conf(4), and pkill(1).

How to Check the Commands Executed by FTP Users

To see what commands are being executed by FTP users, use the log commands logging capability in ftpaccess.

  1. Add the following directive to the ftpaccess file to log individual commands by users who are specified in typelist.

    log commands typelist
  2. Check messages that are written to /etc/syslogd.conf.

 
 
 
  Previous   Contents   Next