PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : vsftpd will einfach nicht...



pablovschby
03.12.04, 00:08
und ich check einfach nicht ganz, warum... zum starten meint der "ok" und beim beenden dann "fehlgeschlagen". Obwohl ich einen User anlegte, der auf keinen der userlisten von vsftpd drauf ist, speziell für ftp, kann ich nicht connecten, wahrscheinlich läuft der service gar nicht.

Ich habe echt keine Ahnung, wo der Hund ist, aber kann ja mal die config posten:# Example config file /etc/vsftpd.conf
#
# The default compiled in settings are very paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
#
# Allow anonymous FTP?
anonymous_enable=NO
#
# Uncomment this to allow local users to log in.
local_enable=YES
#
# Uncomment this to enable any form of FTP write command.
write_enable=YES
#
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
local_umask=077
#
# Uncomment this to allow the anonymous FTP user to upload files. This only
# has an effect if the above global write enable is activated. Also, you will
# obviously need to create a directory writable by the FTP user.
#anon_upload_enable=YES
#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
#anon_mkdir_write_enable=YES
#
# Activate directory messages - messages given to remote users when they
# go into a certain directory.
dirmessage_enable=YES
#
# Activate logging of uploads/downloads.
xferlog_enable=YES
#
# Make sure PORT transfer connections originate from port 20 (ftp-data).
connect_from_port_20=YES
#
# If you want, you can arrange for uploaded anonymous files to be owned by
# a different user. Note! Using "root" for uploaded files is not
# recommended!
#chown_uploads=YES
#chown_username=whoever
#

chroot_local_user=YES

# You may override where the log file goes if you like. The default is shown
# below.
xferlog_file=/var/log/vsftpd.log
#
# If you want, you can have your log file in standard ftpd xferlog format
xferlog_std_format=YES
#
# You may change the default value for timing out an idle session.
#idle_session_timeout=600
#
# You may change the default value for timing out a data connection.
#data_connection_timeout=120
#
# It is recommended that you define on your system a unique user which the
# ftp server can use as a totally isolated and unprivileged user.
#nopriv_user=ftpsecure
#
# Enable this and the server will recognise asynchronous ABOR requests. Not
# recommended for security (the code is non-trivial). Not enabling it,
# however, may confuse older FTP clients.
#async_abor_enable=YES
#
# By default the server will pretend to allow ASCII mode but in fact ignore
# the request. Turn on the below options to have the server actually do ASCII
# mangling on files when in ASCII mode.
# Beware that turning on ascii_download_enable enables malicious remote parties
# to consume your I/O resources, by issuing the command "SIZE /big/file" in
# ASCII mode.
# These ASCII options are split into upload and download because you may wish
# to enable ASCII uploads (to prevent uploaded scripts etc. from breaking),
# without the DoS risk of SIZE and ASCII downloads. ASCII mangling should be
# on the client anyway..
#ascii_upload_enable=YES
#ascii_download_enable=YES
#
# You may fully customise the login banner string:
#ftpd_banner=Welcome to blah FTP service.
#
# You may specify a file of disallowed anonymous e-mail addresses. Apparently
# useful for combatting certain DoS attacks.
#deny_email_enable=YES
# (default follows)
#banned_email_file=/etc/vsftpd.banned_emails
#
# You may specify an explicit list of local users to chroot() to their home
# directory. If chroot_local_user is YES, then this list becomes a list of
# users to NOT chroot().
#chroot_list_enable=YES
# (default follows)
#chroot_list_file=/etc/vsftpd.chroot_list
#
# You may activate the "-R" option to the builtin ls. This is disabled by
# default to avoid remote users being able to cause excessive I/O on large
# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
# the presence of the "-R" option, so there is a strong case for enabling it.
#ls_recurse_enable=YES

pam_service_name=vsftpd
userlist_enable=YES
#enable for standalone mode
listen=YES
tcp_wrappers=YESIst doch alles sauber, oder?
cat /etc/xinetd.d/vsftpd
service vsftpd
{
type = INTERNAL
server = /usr/sbin/vsftpd
nice = 10
socket_type = stream
protocol = tcp
user = root
wait = no
disable = no

}??
Danke

`kk
03.12.04, 00:19
Guck mal in deine /etc/inetd.conf und entferne falls vorhanden den FTP-Eintrag.
Danach sollte es gehen.

Falls da kein Eintrag ist muss ich nochmal überlegen. :rolleyes:

PS: Guck doch ob er läuft, z.B. mit nmap.

pablovschby
03.12.04, 00:24
cat /etc/xinetd.conf
#
# Simple configuration file for xinetd
#
# Some defaults, and include /etc/xinetd.d/

defaults
{
instances = 60
log_type = SYSLOG authpriv
log_on_success = HOST PID
log_on_failure = HOST
cps = 25 30
}

includedir /etc/xinetd.d
}Was heisst das jetze. ..?

`kk
03.12.04, 00:25
Nimm bitte die richtige Datei.

pablovschby
03.12.04, 00:26
Nimm bitte die richtige Datei.Ich dachte, du meinst xinetd, weils die andere bei dem RH9 net gibt:
cat /etc/inetd.conf
cat: /etc/inetd.conf: Datei oder Verzeichnis nicht gefunden
aber ich such sie kurz

edit: keine Datei namens inetd.conf auf der Festplatte... was meinst du für eine Datei?

`kk
03.12.04, 00:30
Ja ok, dann hast du kein inetd...
Ist xinetd gestartet?

# /etc/init.d/xinetd start

Der Untergeher
03.12.04, 00:31
kommentier mal 'listen=YES' aus ... wenn du vsftpd über xinetd starten willst muß das weg.

Grüße

Untergeher

pablovschby
03.12.04, 00:31
Die Datei stimmt schon.
Sry, dann guck halt ob's läuft.Ohne *******, bei mir gibt es die Datei nicht.

Dann "guck ich mal", obs läuft, läuft aber nicht...
gruss
BTW: xinetd immer schön restartet nach änderungen, ja, xinetd ist demnach gestartet.
Listen=yesHab ich jetzt auskommentiert, immer noch das gleiche Problem...

Es ist, als würde der Dämon einfach gar nicht gestartet...hmmm

Der Untergeher
03.12.04, 00:59
Wenn es noch nicht läuft ... probier's mal mit der vsftpd.conf:


write_enable=YES
dirmessage_enable=YES
nopriv_user=ftp
anonymous_enable=YES
anon_world_readable_only=YES
anon_upload_enable=YES
log_ftp_protocol=YES
xferlog_enable=YES
vsftpd_log_file=/var/log/vsftpd.log
xferlog_std_format=YES
xferlog_file=/var/log/xferlog
dual_log_enable=YES
connect_from_port_20=YES
pam_service_name=vsftpd

Dann solltest du dich mit L:ftp P:irgendwas einloggen können.

Viel Erfolg

pablovschby
03.12.04, 01:04
Dann solltest du dich mit L:ftp P:irgendwas einloggen können.

Viel ErfolgIch weiss jetzt nicht, was du mit L und P (Password?) meinst, aber dein Config-file hat auch nichts gebracht...

???????hüülfe????????'

Der Untergeher
03.12.04, 01:12
wenn du versuchst dich mit dem ftp-server zu verbinden brauchst du login (L) und password (P). Was passiert denn, wenn du 'ftp 127.0.0.1' eingibst?

pablovschby
03.12.04, 01:29
der läuft doch, aber wie:
ftp localhost
Connected to localhost (127.0.0.1).
220 (vsFTPd 1.1.3)
Name (localhost:user): user
530 This FTP server is anonymous only.
Login failed.Wieso anonymous? Ich hab das ja disabled, wie oben beschrieben...

Ich check nix mehr...büdde helft.

Der Untergeher
03.12.04, 01:38
Möglicherweise verwendest du die vsftpd.conf die ich dir geschickt habe? Wenn ja dann kannst du dich als Name: (=user=login) 'ftp' oder, was gleichbedeutend ist, 'anonymous' mit beliebigem password anmelden. Es funktioniert doch ... :confused:

Jetzt kannst du meine Konfiguration schrittweise so abändern, dass sie deinen Wünschen hinsichtlich der Benutzerverwaltung entspricht.

pablovschby
03.12.04, 01:40
Möglicherweise verwendest du die vsftpd.conf die ich dir geschickt habe?Nee, die hab ich längst wieder rausgelöscht, ich verwende die ganz weit obenstehende config.

Wieso also ist anonymous erlaubt und nur das, obwohl das disabled ist? Wieso kann ich mit "user" nicht drauf? Wieso kan n ich den Service nach wie vor nicht sauber beenden (fehlgeschlagen)?

Wo ist der Hund?

Der Untergeher
03.12.04, 01:49
Ich denke mal der vsftpd läuft mit meiner .conf und wurde noch nicht wieder beendet. Starte mal '/etc/init.d/xinetd restart' und kontrolliere ob der login - als anonymous - dann immernoch klappt. Ist das Listen=YES noch auskommentiert?
Wie versuchst du "den Service [...] sauber [zu] beenden (fehlgeschlagen)"?

pablovschby
03.12.04, 02:10
/etc/init.d/xinetd restart
xinetd beenden: [ OK ]
xinetd starten: [ OK ]schon mehrmals gemacht
[bla]# /etc/init.d/vsftpd start
vsftpd für vsftpd starten: [ OK ]
[bla]# ftp localhost
Connected to localhost (127.0.0.1).
220 (vsFTPd 1.1.3)
Name (localhost:pablo): user
530 This FTP server is anonymous only.
Login failed.Was ich meine mit sauber beenden:
/etc/init.d/vsftpd stop
vsftpd herunterfahren: [FEHLGESCHLAGEN]Der prozess wird eben nie beendet.

der läuft doch, aber wie:
ftp localhost
Connected to localhost (127.0.0.1).
220 (vsFTPd 1.1.3)
Name (localhost:user): user
530 This FTP server is anonymous only.
Login failed.Wieso anonymous? Ich hab das ja disabled, wie oben beschrieben...
Was ist da falsch dranne?

Der Untergeher
03.12.04, 03:01
Ok, es wird heller :) . Also: Es gibt grundsätzlich zwei verschiedene Möglichkeiten Ftp-Server (und einige andere Dienste) zu betreiben. Erstens über (x)inetd und Zweitens im "standalone"-Betrieb. Im ersten Fall überläßt du xinetd das starten des Serverprozesses (das passiert dann erst, wenn Pakete auf dem entsprechenden Port eintreffen). Im Zweiten Fall gibts Startup-Skripte wie z.B. /etc/init.d/vsftpd, die man aufrufen muß.
Wenn Du xinetd verwenden willst (dann mußt Du Listen=Yes auskommentieren) ist die Verwendung von '/etc/init.d/vsftpd stop' also nicht sinnvoll und muss fehlschlagen. Statt dessen kannst Du den Dienst mit '/etc/init.d/xinetd stop' abschalten.
Für den Fall das sich da jetzt irgenwas "verklemmt" hat beim Änderen der configs und dem ganzen restarts. Schalt erstmal alles ab:

/etc/init.d/xinetd stop
killall -9 vsftpd
Dann überprüf' die Config. (Listen=Yes auskommentieren) Dann schmeiß den xinetd wieder an:

/etc/init.d/xinetd start
Dann mit ftp 127.0.0.1 die Lage checken ... und schau was passiert. Geht der anonymous Login wirklich?

Jetzt erstmal gute Nacht :)

pablovschby
03.12.04, 10:19
Danke, Untergeher, für die späte Antwort noch.
etc/init.d/xinetd stop
xinetd beenden: [ OK ]
[bla]# killall -9 vsftpd
vsftpd: Kein Prozess abgebrochencat /etc/vsftpd/vsftpd.conf......

pam_service_name=vsftpd
userlist_enable=YES
#enable for standalone mode
#listen=YES
tcp_wrappers=YES
..........hmmm
/etc/init.d/xinetd start
xinetd starten: [ OK ]
[bla]# ftp 127.0.0.1
Connected to 127.0.0.1 (127.0.0.1).
220 (vsFTPd 1.1.3)
Name (127.0.0.1:pablo): user
530 This FTP server is anonymous only.
Login failed.
ftp>Wo zum Geier ist der Hund begraben? Was mach ich falsch?

Langsam aber sicher verzweifle ich, *hülfe*

pablovschby
03.12.04, 12:02
Also, erstmal: Ich habe echt lange gesucht und irgendwie war mir immer klar, dass die Configdatei /etc/vsftpd/vsftpd.conf ausschlaggebend ist, ist sie aber nicht. Hab die Datei jetzt nach /etc/vsftpd.conf kopiert und der Server ist nicht mehr ein Anonymous-Server.

Nun meine Frage: Geht nämlich trotzdem nicht. Nach restarten des xinetd:
ftp 127.0.0.1
Connected to 127.0.0.1 (127.0.0.1).
500 OOPS: missing value in config fileWelcher Wert vermisst er?
cat /etc/vsftpd.conf
# Example config file /etc/vsftpd.conf
#
# The default compiled in settings are very paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
#
# Allow anonymous FTP?
anonymous_enable=NO
#
# Uncomment this to allow local users to log in.
local_enable=YES
#
# Uncomment this to enable any form of FTP write command.
write_enable=YES
#
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
local_umask=077
#
# Uncomment this to allow the anonymous FTP user to upload files. This only
# has an effect if the above global write enable is activated. Also, you will
# obviously need to create a directory writable by the FTP user.
#anon_upload_enable=YES
#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
#anon_mkdir_write_enable=YES
#
# Activate directory messages - messages given to remote users when they
# go into a certain directory.
dirmessage_enable=YES
#
# Activate logging of uploads/downloads.
xferlog_enable=YES
#
# Make sure PORT transfer connections originate from port 20 (ftp-data).
connect_from_port_20=YES
#
# If you want, you can arrange for uploaded anonymous files to be owned by
# a different user. Note! Using "root" for uploaded files is not
# recommended!
#chown_uploads=YES
#chown_username=whoever
#

chroot_local_user=YES

# You may override where the log file goes if you like. The default is shown
# below.
xferlog_file=/var/log/vsftpd.log
#
# If you want, you can have your log file in standard ftpd xferlog format
xferlog_std_format=YES
#
# You may change the default value for timing out an idle session.
#idle_session_timeout=600
#
# You may change the default value for timing out a data connection.
#data_connection_timeout=120
#
# It is recommended that you define on your system a unique user which the
# ftp server can use as a totally isolated and unprivileged user.
#nopriv_user=ftpsecure
#
# Enable this and the server will recognise asynchronous ABOR requests. Not
# recommended for security (the code is non-trivial). Not enabling it,
# however, may confuse older FTP clients.
#async_abor_enable=YES
#
# By default the server will pretend to allow ASCII mode but in fact ignore
# the request. Turn on the below options to have the server actually do ASCII
# mangling on files when in ASCII mode.
# Beware that turning on ascii_download_enable enables malicious remote parties
# to consume your I/O resources, by issuing the command "SIZE /big/file" in
# ASCII mode.
# These ASCII options are split into upload and download because you may wish
# to enable ASCII uploads (to prevent uploaded scripts etc. from breaking),
# without the DoS risk of SIZE and ASCII downloads. ASCII mangling should be
# on the client anyway..
#ascii_upload_enable=YES
#ascii_download_enable=YES
#
# You may fully customise the login banner string:
#ftpd_banner=Welcome to blah FTP service.
#
# You may specify a file of disallowed anonymous e-mail addresses. Apparently
# useful for combatting certain DoS attacks.
#deny_email_enable=YES
# (default follows)
#banned_email_file=/etc/vsftpd.banned_emails
#
# You may specify an explicit list of local users to chroot() to their home
# directory. If chroot_local_user is YES, then this list becomes a list of
# users to NOT chroot().
#chroot_list_enable=YES
# (default follows)
#chroot_list_file=/etc/vsftpd.chroot_list
#
# You may activate the "-R" option to the builtin ls. This is disabled by
# default to avoid remote users being able to cause excessive I/O on large
# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
# the presence of the "-R" option, so there is a strong case for enabling it.
#ls_recurse_enable=YES

pam_service_name=vsftpd
userlist_enable=YES
#enable for standalone mode
#listen=YES
tcp_wrappers=YES??? Kann mir da niemand weiterhelfen ???

pablovschby
03.12.04, 15:43
Problem gelöst.

Folgende Configdatei hab ich jetzt herangebastelt:
cat /etc/vsftpd.conf
anonymous_enable=NO
#listen=YES
local_enable=YES
local_umask=077
log_ftp_protocol=YES
write_enable=YES
xferlog_enable=YES
#anon_max_rate=0
#connect_timeout=60
ftp_data_port=20
connect_from_port_20=YES
#idle_session_timeout=60
#max_clients=5
pam_service_name=vsftpd
xferlog_file=/var/log/vsftpd.log
chroot_local_user=YES
xferlog_std_format=YES
userlist_enable=YES
Möchte allen danken, die mir geholfen haben..
:) ;)