Enabling and Disabling ftp services on Solaris

For security purposes, administrators may wish to disable ftpon a given Solaris system. This article provides the simple steps necessary to perform this task under Solaris 8 & 9 [updated for Solaris 10 & 11]

Solaris 8 and Solaris 9

  • Confirm ftp is enabled or disabled:
    # grep ftp /etc/inetd.conf
    ftp	stream	tcp	nowait	root	/usr/sbin/tcpd	in.ftpd -l -a
    If the ftp string is commented out (preceeded with #), then ftp is disabled else it is enabled.
  • To disable ftp, edit /etc/inetd.conf and comment out the ftp string, ie:
    #ftp	stream	tcp	nowait	root	/usr/sbin/tcpd	in.ftpd -l -a
    then run
    # kill -HUP inetd
  • To enable ftp, edit /etc/inetd.conf and uncomment the ftp string, ie
    ftp	stream	tcp	nowait	root	/usr/sbin/tcpd	in.ftpd -l -a
    then perform
    # kill -HUP inetd

Solaris 10

  • Confirm ftp is enabled or not
    # inetadm | grep ftp
    enabled   online         svc:/network/ftp:default
  • To disableftp, perform:
    # inetadm -d ftp
  • To enableftp, perform:
    # inetadm -e ftp
  • To list details about ftp:
    # inetadm -l ftp

Solaris 11

  • Confirm state of ftp:
    # svcs -a | grep ftp
  • To disable ftp, perform:
    # svcadm disable  svc:/network/ftp:default
  • to enable ftp, perform:
    # svcadm enable  svc:/network/ftp:default
  • To list details about ftp:
    # svcs -l svc:/network/ftp:default
    # svcs -xv svc:/network/ftp:default