FTP Server einrichten

krizzelfix

Commander
Registriert
Sep. 2005
Beiträge
2.626
Hallo zusammen,

ich bin garde dabei einen FTP Server einzurichten.
Bekomme aber immer die nachricht von meinem FTP Programm:
Status: Verbinde mit 192.168.2.23:21...
Status: Verbindung hergestellt, warte auf Willkommensnachricht...
Fehler: Herstellen der Verbindung zum Server fehlgeschlagen

Meine proftpd.conf sieht so aus:
# This is a basic ProFTPD configuration file.
# It establishes a single server and a single anonymous login.
# It assumes that you have a user/group "nobody" and "ftp"
# for normal/anonymous operation.

ServerName "FTP Server"
ServerType standalone
#ServerType inetd
DefaultServer on

# Port 21 is the standard FTP port.
Port 21
# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask 022

# To prevent DoS attacks, set the maximum number of child processes
# to 30. If you need to allow more than 30 concurrent connections
# at once, simply increase this value. Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd)
MaxInstances 30

# Set the user and group that the server normally runs at.
User nobody
Group nogroup

# This next option is required for NIS or NIS+ to work properly:
#PersistentPasswd off

SystemLog /var/log/proftpd.log
TransferLog /var/log/xferlog

# Normally, we want files to be overwriteable.
<Directory /*>
AllowOverwrite on
</Directory>

# A basic anonymous FTP server configuration.
# To enable this, remove the user ftp from /etc/ftpusers.
<Anonymous /var/www/apache2-default/>
RequireValidShell off
User ftp
Group ftp
# We want clients to be able to login with "anonymous" as well as "ftp"
UserAlias anonymous ftp

# Limit the maximum number of anonymous logins
MaxClients 50

# We want 'welcome.msg' displayed at login, and '.message' displayed
# in each newly chdired directory.
DisplayLogin welcome.msg
DisplayFirstChdir .message

# Limit WRITE everywhere in the anonymous chroot
<Limit WRITE>
DenyAll
</Limit>
</Anonymous>
Wieso bekomm ich den Fehler?

Bin für jede Hilfe dankbar.

Grüße

krizzel
 
Hallo e-Laurin,

das System ist ein Debian 4 Server.
Den Web und Samba Server ereiche ich ohne Probleme unter der IP.

Wie kann ich testen ob der Daemon läuft?
 
Falls da nur etwas von grep ftp in der gefilterten Prozessliste stehen sollte, kannst du probieren das Teil als root von Hand zu starten.
Die Start / Stop Scripte stehen unter /etc/init.d
also z.B.: /etc/init.d/proftpd start
 
Der Server läuft. Habe den gestern schon mehrmals als root mit /etc/init.d/proftpd restart neu gestart.
Und bei netstat -pant wurde proftpd auch in der Liste angezeigt.
 
Ausgabe von ps aux | grep ftp
ps aux | grep ftp
root 3397 0.0 0.0 1724 636 ? Ss 19:07 0:00 /usr/sbin/in.ftpd
root 3399 0.0 0.0 2872 752 pts/0 R+ 19:07 0:00 grep ftp

Im proftpd.log steht folgendes:
Nov 28 19:10:19 hlemmur proftpd[3423] hlemmur.de: Failed binding to 0.0.0.0, port 21: Address already in use
Nov 28 19:10:19 hlemmur proftpd[3423] hlemmur.de: Check the ServerType directive to ensure you are configured correctly.
netstat -pant gibt folgendes aus:
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:901 0.0.0.0:* LISTEN 2474/inetd
tcp 0 0 127.0.1.1:3306 0.0.0.0:* LISTEN 2309/mysqld
tcp 0 0 0.0.0.0:52683 0.0.0.0:* LISTEN 2527/rpc.statd
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN 2483/smbd
tcp 0 0 0.0.0.0:9999 0.0.0.0:* LISTEN 2614/perl
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1970/portmap
tcp 0 0 0.0.0.0:113 0.0.0.0:* LISTEN 2474/inetd
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 2474/inetd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2462/exim4
tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN 2483/smbd
tcp6 0 0 :::80 :::* LISTEN 2591/apache2
tcp6 0 0 :::22 :::* LISTEN 2505/sshd
tcp6 0 296 ::ffff:192.168.2.23:22 ::ffff:192.168.2.:49168 VERBUNDEN 3371/sshd: svavarss
 
Da hast du doch schon deinen Fehler, es läuft schon ein anderer FTP Server. Entweder als demon oder metademon (start aus (x)inetd).
Den anderen (in.ftpd) stoppen bzw. aus dem metademon herausnehmen dann sollte auch dein proftpd laufen.

Das was anderes läuft, siehst du an deiner zweiten Meldung 'Address already in use'. Und das andere Programm benutzt mit Sicherheit andere Konfigurationsdateien...
 
Zuletzt bearbeitet:
Poste mal die Logs nach dem du versucht hast auf den zu gehen mit deinem Guido Westerwelle [FDP]Clienten (File Zilla oder so). Die Logspeicherorte sind ja in deiner config.
Was mir aufgefallen ist oder was ich übersehen hab ist eine Pfadangabe zu einem Verzeichnis.

http://www.pro-linux.de/work/server/ftp01.html

Übrigens Linux hilfe am besten google.de/linux liefert präzisere Ergebnisse als das normale Google.de
 
Zuletzt bearbeitet:
Hab jetzt einen eintrag aus der inetd.conf auskommentiert, und jetzt sieht das Ergebnis von netstat -pant so aus:
Aktive Internetverbindungen (Server und stehende Verbindungen)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.1.1:3306 0.0.0.0:* LISTEN 2307/mysqld
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN 2481/smbd
tcp 0 0 0.0.0.0:9999 0.0.0.0:* LISTEN 2612/perl
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1968/portmap
tcp 0 0 0.0.0.0:54224 0.0.0.0:* LISTEN 2525/rpc.statd
tcp 0 0 0.0.0.0:113 0.0.0.0:* LISTEN 2472/inetd
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 2472/inetd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2460/exim4
tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN 2481/smbd
tcp 0 0 192.168.2.23:21 192.168.2.20:49467 VERBUNDEN 2668/in.ftpd
tcp 0 0 192.168.2.23:21 192.168.2.20:49466 TIME_WAIT -
tcp6 0 0 :::80 :::* LISTEN 2589/apache2
tcp6 0 0 :::22 :::* LISTEN 2503/sshd
tcp6 0 444 ::ffff:192.168.2.23:22 ::ffff:192.168.2.:49465 VERBUNDEN 2642/sshd: svavarss
hlemmur:/home/svavarsson# netstat -pant
Aktive Internetverbindungen (Server und stehende Verbindungen)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.1.1:3306 0.0.0.0:* LISTEN 2307/mysqld
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN 2481/smbd
tcp 0 0 0.0.0.0:9999 0.0.0.0:* LISTEN 2612/perl
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1968/portmap
tcp 0 0 0.0.0.0:54224 0.0.0.0:* LISTEN 2525/rpc.statd
tcp 0 0 0.0.0.0:113 0.0.0.0:* LISTEN 2472/inetd
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 2472/inetd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2460/exim4
tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN 2481/smbd
tcp 0 0 192.168.2.23:21 192.168.2.20:49467 TIME_WAIT -
tcp 0 0 192.168.2.23:21 192.168.2.20:49466 TIME_WAIT -
tcp 0 0 192.168.2.23:21 192.168.2.20:49468 TIME_WAIT -
tcp6 0 0 :::80 :::* LISTEN 2589/apache2
tcp6 0 0 :::22 :::* LISTEN 2503/sshd
tcp6 0 296 ::ffff:192.168.2.23:22 ::ffff:192.168.2.:49465 VERBUNDEN 2642/sshd: svavarss
hlemmur:/home/svavarsson#
Da scheint ja irgendwas zu passieren, aber der Fehler ist immernochd er selbe wie oben.
Und in dem Log steht immernoch:
Nov 29 04:57:36 hlemmur proftpd[2539] hlemmur.de: Failed binding to 0.0.0.0, port 21: Address already in use
Nov 29 04:57:36 hlemmur proftpd[2539] hlemmur.de: Check the ServerType directive to ensure you are configured correctly.
 
Ok, jetzt funktioniert alles.
Ich hatte heute Nacht wohl den Eintrag ftp in der inetd.conf übersehen.
Habe den Eintrag jetzt auskommentiert, und jetzt kann ich auch über den Port 21 mit dem Server verbinden.

Besten dank euch allen.

Grüße

krizzel
 
Zurück
Oben