Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

i'm currently thinking of a clean way of how to bring an ftp server down for maintenance. i wonder, if anybody out there could give me some hints of how to solve this:

  • i don't want to interrupt any current uploads, but want to block any new connects / uploads and wait, till uploads have finished, before taking down the ftp server
  • is there a way of dynamically prevent user-logins and show a message eg.: "ftp currently down for maintenance" when a user tries to log in?

are my thoughts on this very uncommon or how do others handle this -- i feel, that just halting ftp server and killing any current uploads is not the right way for this ...

i use proftpd (with SQL backend) btw, maybe there are some specific solutions for this -- or are there any generic tools to achieve this?

many thanks!

share|improve this question

2 Answers 2

up vote 1 down vote accepted

Try ftpshut, it's supposed to bring the server down gracefully. There's an article here about using it with proftpd.

The ftpshut command provides an automated shutdown procedure that a superuser can use to automagically disconnect current proftpd connections, and deny new connections. The command creates a control file as /etc/shutmsg to inform proftpd processes about an impending shutdown.

share|improve this answer
    
thanks! now i use it and i like it –  harald Nov 24 '10 at 15:46

Whenever we need to do work on our FTP servers, we just shut them down (after arranging the downtime internally) - extenal users can resume their uploads when it's back up.

You may be able to find a way to get proftpd to respect /etc/nologin or something like that, but I've never seen anything.

Alternatively, if you have your users stored in a SQL backend, you could stop the SQL server/block the FTP server from talking to the SQL server/change the SQL password/login to prevent new logins.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.