ich möchte hier die Möglichkeit zeigen, wie man in Pure-FTPD einen eigenen Banner nutzen kann, wenn man dies möchte. In vergleichbaren FTP-Serverdiensten ist es ziemlich einfach, da man hierzu nur in der config-File einen entsprechenden Eintrag setzt, z.B. bei VSFTPD schreibt man in die /etc/vsftp.conf hinein "banner_file=/etc/vsftpd.mybanner" Beim Pure-FTP sieht's wieder etwas anders aus
Die PureFTP doc sagt dazu folgendes:
Sofern also mit --with-cookie kompiliert wurde (die PureFTPd Versionen in ISPconfig3 Installationen sind es zum Bleistift), kann man nun durch die Angabe der Option -F so ein extra File als Banner laden. Dazu müssen wir nicht in dem Skript /etc/init.d/pure-ftpd-mysql pfuschen, sondern erledigen das Ganze wie folgt:Recompile PureFTPd with:
--with-welcomemsg: read 'welcome.msg' files for compatibility with some
other FTP servers. This is a security flaw (anonymous users may upload
'welcome.msg' files to add random banners) . Pure-ftpd uses '.banner' files
by default.
or
--with-cookie: display a fortune or a customized banner when a user logs
in (see the '-F' option)
Once cookie/fortune in enabled during compile you should then be able to specify a fortune file with:
- '-F <fortune file>': Display a fortune cookie on login. The sentence is
a random extract from the text file <fortune file>. This text file should be
formatted like standard "fortune" files (fortunes are separated by a '%'
sign on a single line) . Pure-FTPd has to be compiled with support for
cookies (--with-cookie). If you just want a simple banner displayed before
the login prompt, add the name of any text file here.
- Wir erstellen eine neue Datei und schreiben darin, welche Datei als Welcome-Banner genutzt werden soll.
Der Inhalt sieht dann beispielsweise so aus:
Code: Alles auswählen
vi /etc/pure-ftpd/conf/FortunesFile
/etc/pure-ftpd/meinbanner.txt - Jetzt erstellen wir einfach eine Datei /etc/pure-ftpd/meinbanner.txt und schreiben darin unseren gewünschten Text, der nach dem Login am FTP-Server erscheinen soll.
- /etc/init.d/pure-ftpd-mysql restart