PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : vsftpd: Problem mit Anonymous-Rechten



Mr. Wolfenstein
17.02.05, 23:38
Hi. Ich versuche die ganze Zeit schon einen ftp-server mit Anonymous-Konto einzurichten. Zuerst hab ich es mit vsftpd probiert. Danach proftpd (gab Probs mit meiner /etc/hosts) und jets bin ich wieder bei vsftpd. Mein Problem ist folgendes:

Ich habe dem Anonymous-Ordner /var/ftp/pub schreibrechte gegeben mit Hilfe des Datei-Browser von Gnome. Jets ist es so das ich auch Dateien uploaden kann und diese auch wieder löschen. Allerdings wenn ich einen Order mit Inhalt uploade was auch ohne Probleme geht kann ich weder den Inhalt sehen noch den Ordner wieder löschen! Der Inhalt ist aber vorhanden d.h. der Upload ist korrekt verlaufen.

Wie mache ich das ? Ein Verlegen des Ordners auf /home brachte die selben Ergebnisse. Und wenn ich den Anonymous-Zugang auf meinen User-Konto laufen lasse verlangt er ein Password obwohl es eigentlich ja ohne gehen müsste :confused:

Sorry aber meine momentanen Linux-Kenntnisse helfen mir leider nicht mehr weiter.

Danke im Voraus

hans harm
18.02.05, 08:14
Hi,
setze in der vsftpd.conf die Option:

anon_world_readable_only=NO

dann sollte es gehen!

Gruss
hans harm

Mr. Wolfenstein
18.02.05, 11:18
Danke erstmal. Das ganze hat kurzzeitig funktioniert. Jets hab ich aber ein anderes Problem. Ich wollte das Verzeichnis von /home/homer/ftp wieder ins Default-Verzeichnis /var/ftp ändern. Das habe ich auch gemacht. Allerdings verlangt er jets immer eine Anmeldung. Anonymous-Zugang ist nicht erlaubt laut Fehlermeldung. Ich versteh das ganze jets gar nicht mehr. Es ging doch mal per Anonymous wieso jets nicht mehr :confused:

Der Ordner hat folgende Rechte: drwxrwxrwx

Müste doch eigentlich passen oder ? Ich hab als Dateibesitzer und Gruppe jeweils mal root und ftp-user bzw ftp als Grupppe probiert aber es ändert sich nichts. Ich kopiere mal die vsftpd.conf hier rein weil ich bin mit meinem Latein am Ende.

# Example config file /etc/vsftpd/vsftpd.conf
#
# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults.
#
# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
# capabilities.
#
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=YES
#
# Uncomment this to allow local users to log in.
local_enable=NO
#
# 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=022
#
# 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
#
# 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=NO
#enable for standalone mode
listen=YES
tcp_wrappers=YES

anon_other_write_enable=YES
anon_world_readable_only=NO

hans harm
18.02.05, 12:06
Hi,
Wo hast Du den das Default-Verzeichnis (standardmäßig glaube ich /srv/ftp und nicht /var/ftp) angepasst, in der /etc/passwd beim User ftp?
Solltest Du ansonsten noch machen/ändern.

Nach einem restart von xinetd sollte das eigentlich wieder wie vorher funktionieren!

Gruss

hans harm

Mr. Wolfenstein
18.02.05, 13:24
In der /etc/passwd hab ich nichts verändert. Da steht folgendes drin:

ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin

Ich hab das Verzeichnis dadurch verändert in dem ich folgenden Eintrag in die vsftpd.conf geschrieben habe:

anon_root=$/home/homer/ftp

Sonst noch ne Idee ?

Mr. Wolfenstein
18.02.05, 13:36
Ich hab jets den vsftpd einfach deinstalliert und anschliessend wieder installiert und neu konfiguriert. Jets geht es. Komisch.

Dennoch danke für deine Mühe!

Tomek
18.02.05, 15:15
Mr. Wolfenstein: Benutze bitte in Zukunft die CODE-Tags für Konfigurations-, Logdateien usw. Wie das geht, erfährst du hier: http://www.linuxforen.de/forums/misc.php?do=bbcode#code