Go to main content

Managing Remote Systems in Oracle® Solaris 11.3

Exit Print View

Updated: October 2017
 
 

How to Shut Down the FTP Connection

The ftpshut(8) command closes down the FTP server at a particular time. If you want to stop serving FTP only, but not stop the daemon (so it can report the service is not available to clients) then use this procedure. The ftpshut command will block connections and stop the current connection, but not shutdown the server daemon itself.

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 /etc/shutmsg.

  1. Become an administrator.

    For more information, see Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.3.

  2. Run the ftpshut command.
    # ftpshut [-l min] [-d min] time [warning-message...]
    ftpshut

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

    –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; see the ftpshut(8) man page for more information

  3. Restore access to the files.

    Use the ftprestart command to restart the connections to the FTP server. For further information, see ftpshut(8) and ftprestart(8).