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:
- Add an entry such as the following to the /etc/syslog.conf file.
daemon.info /var/adm/message
- 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.
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:
- Add the following directive to the ftpaccess file.
greeting text message
- Connect to the FTP server.
- If the message fails to appear, do the following:
- 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"
- 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).
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.
- Add the following directive to the ftpaccess file to log individual commands
by users who are specified in typelist.
log commands typelist
- Check messages that are written to the location specified in the /etc/syslog.conf.