ftpshut(8)

πŸ“¦
version 1.3.9e Β· 4 versions
, in alpine 3.24, debian bookworm, debian trixie, epel 10, epel 9, opensuse-leap 16.0, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– ftpshut β€” bestie, it's the shutdown button πŸ’–

okay so welcome to ftpshut(8), from the System Manager's Manual section 8 (that's the "sysadmin only, no touching" section, iykyk) ✨


🌸 NAME 🌸

ftpshut β€” shut down all proftpd servers at a given time β°πŸ’€


πŸŽ€ SYNOPSIS πŸŽ€

ftpshut [ -R ] [ -l min ] [ -d min ] time [ warning-message ]

✨ DESCRIPTION ✨

ok so ftpshut is the automated shutdown procedure, and it's giving superuser main character energy πŸ‘‘ β€” a superuser can use it to automagically disconnect the proftpd connections that are currently happening, and deny any new ones from even thinking about it πŸš«πŸ”Œ

The way it works is: the command creates a control file at /etc/shutmsg, and that file is basically a lil gossip note to the proftpd processes being like "hey bestie, a shutdown is coming" πŸ“βœ¨


πŸ’… OPTIONS πŸ’…

  • time β€” the time at which the ftp servers get brought down πŸ• It can be the word now, which means immediate shutdown, no waiting, bye πŸ‘‹ or it can be a future time in one of two formats: +number or HHMM. The +number form brings the servers down in number minutes, and the HHMM form means an exact time of day using a 24-hour clock format ⏳
  • -R β€” tells ftpshut to remove the /etc/shutmsg file, which restores proftpd to its normal service 🫢 If this option is used, this will be the only operation performed by ftpshut β€” it's not doing anything else, periodt πŸ’…
  • -l min β€” specifies the number of minutes before shutdown that new ftp access will be disabled 🚧 If -l isn't specified, the default is 10 minutes (or immediately, if less than 10 minutes remains until shutdown) ⏱️
  • -d min β€” specifies the number of minutes before shutdown that existing ftp connections will be disconnected βœ‚οΈ If -d isn't specified, the default is 5 minutes (or immediately, if less than 5 minutes remains until shutdown) ⏱️
  • warning-message β€” optionally, you can provide a message πŸ₯Ί which will be sent to new connections (if denied) and to existing connections (when disconnected). The message can contain the following magic cookies πŸͺ, which get replaced as follows before being sent out to new or existing connections:
    • %s β€” time proftpd is being shut down
    • %r β€” time new connections will be denied
    • %d β€” time current connections will be dropped
    • %C β€” current working directory (where applicable)
    • %L β€” local host name (or virtualhost name)
    • %R β€” remote host name
    • %T β€” local time (format Thu Nov 15 17:12:42 1990)
    • %U β€” username given at login time

😭 CAVEATS 😭

ok this part is the serious part, bestie, listen up 🫑

Proftpd servers can only be shutdown via ftpshut if a master daemon is running in standalone mode. Servers running in inetd mode will honor the shutdown message file created by ftpshut β€” however, currently running servers may be chroot(2)ed, and unable to read the shutdown message control file 😬

πŸ’€ Also: it is possible to set an absolute shutdown time which is earlier than the current time. If that happens, proftpd will not shutdown until the indicated time on the following day. So like, don't do that unless you mean it πŸ™ˆ

πŸ“ FILES πŸ“

  • /usr/sbin/ftpshut
  • /etc/shutmsg

πŸ’œ AUTHORS πŸ’œ

ProFTPD is written and maintained by a number of people 🫢 β€” full credits can be found on http://www.proftpd.org/credits.html


🌈 SEE ALSO 🌈

inetd(8), ftp(1), proftpd(8), ftpwho(1), ftpcount(1)

Full documentation on ProFTPD, including configuration and FAQs, is available at http://www.proftpd.org/ πŸ“š

For help/support, try the ProFTPD mailing lists, detailed on http://www.proftpd.org/lists.html πŸ“¬

Report bugs at http://bugs.proftpd.org/ πŸ›


and that's the whole page, bestie!! this iconic lil manual page came from March 2003 (throwback fr fr πŸ•°οΈ), it lives in section 8 of the System Manager's Manual as ftpshut(8), and the source/version vibe is all proftpd πŸ’– now go schedule that shutdown responsibly, mwah πŸ˜˜πŸŽ€ ✨