System Administration Guide: Network Services

Debugging the FTP Server

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

ProcedureHow 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.


    # svcadm refresh system/system-log
    

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

ProcedureHow 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 pgrep(1).

ProcedureHow 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 the location specified in the /etc/syslog.conf.