我正在考虑一个干净的方式,如何使一个FTP服务器停机维护。 我想知道,如果有人在那里可以给我一些如何解决这个问题的提示:
这是我的想法,这是非常罕见的,或者别人怎么处理这个 – 我觉得,只是停止FTP服务器,并杀死任何当前的上传不是正确的方式,这…
我使用proftpd(与SQL后端)顺便说一句,也许有一些具体的解决scheme – 或者是否有任何通用工具来实现这一目标?
非常感谢!
尝试ftpshut ,它应该优雅地把服务器closures。 这里有一篇关于使用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.
每当我们需要在我们的FTP服务器上工作时,我们就closures它们(在内部安排停机时间之后),外部用户可以在备份时恢复上传。
你可能能够find一种方法让proftpd尊重/ etc / nologin或类似的东西,但我从来没有见过任何东西。
或者,如果您将用户存储在SQL后端,则可以停止SQL Server /阻止FTP服务器与SQL服务器通话/更改SQL密码/login以防止新login。