PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : vsftpd



testing
16.07.06, 13:50
Hallo Leutz,

ich bin am verzweifeln !!! Als Server benutze ich Suse10.0 mit dem beinhaltenden vsftpd. Auf dem Server sind nun 2 Benutzer angelegt. Wenn ich mich von meinem Client PC mit Suse10.1 und dem FTP Client Kasablanca auf dem Server einloggen möchte, werde ich nicht in das Heimatverzeichnis des Benutzers eingeloggt sondern nur in / ( also root ? ).Der FTP Client sagt mir, dass ich als Anonymous user eingeloggt bin und dann als Fehlermeldung: Can´t change to Driectory /home/user..... Habe abeer Anonymous deaktiviert. Hier mal meine vsftpd.conf:


write_enable=YES
#
# 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.
#
# If you do not change anything here you will have a minimum setup for an
# anonymus FTP server.
#
# 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.

# General Settings
#
# Uncomment this to enable any form of FTP write command.
#
#write_enable=YES
#
# Activate directory messages - messages given to remote users when they
# go into a certain directory.
#
dirmessage_enable=YES
#
# 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
#
# You may fully customise the login banner string:
#
ftpd_banner=Herzlich willkommen bei Linux FTP
#
# 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
#
# 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
#
# If enabled, all user and group information in
# directory listings will be displayed as "ftp".
#
#hide_ids=YES

# Local FTP user Settings
#
# Uncomment this to allow local users to log in.
#
local_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 to put local users in a chroot() jail in their home directory
# after login.
#
#chroot_local_user=YES
#
# You may specify an explicit list of local users to chroot() to their home
chroot_local_user=YES
# users to NOT chroot().
#
#chroot_list_enable=YES
#
# (default follows)
#
#chroot_list_file=/etc/vsftpd.chroot_list
#
# The maximum data transfer rate permitted, in bytes per second, for
# local authenticated users. The default is 0 (unlimited).
#
local_max_rate=7200
# Anonymus FTP user Settings
#
# Allow anonymous FTP?
#
anonymous_enable=NO
#
# Anonymous users will only be allowed to download files which are
# world readable.
#
anon_world_readable_only=YES
#
# 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=NO
#
# Default umask for anonymus users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
#
#anon_umask=022
#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
#
anon_mkdir_write_enable=NO
#
# Uncomment this to enable anonymus FTP users to perform other write operations
# like deletion and renaming.
#
#anon_other_write_enable=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
#
# The maximum data transfer rate permitted, in bytes per second, for anonymous
# authenticated users. The default is 0 (unlimited).
#
anon_max_rate=7200
# Log Settings
#
# Log to the syslog daemon instead of using an logfile.
#
syslog_enable=YES
#
# Uncomment this to log all FTP requests and responses.
#
#log_ftp_protocol=YES
#
# Activate logging of uploads/downloads.
#
#xferlog_enable=YES
#
# You may override where the log file goes if you like. The default is shown
# below.
#
#vsftpd_log_file=/var/log/vsftpd.log
#
# If you want, you can have your log file in standard ftpd xferlog format.
# Note: This disables the normal logging unless you enable dual_log_enable below.
#
#xferlog_std_format=YES
#
# You may override where the log file goes if you like. The default is shown
# below.
#
#xferlog_file=/var/log/xferlog
#
# Enable this to have booth logfiles. Standard xferlog and vsftpd's own style log.
#
#dual_log_enable=YES
#
# Uncomment this to enable session status information in the system process listing.
#
#setproctitle_enable=YES

# Transfer Settings
#
# Make sure PORT transfer connections originate from port 20 (ftp-data).
#
connect_from_port_20=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
#
# 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
#
# Set to NO if you want to disallow the PASV method of obtaining a data
# connection.
#
#pasv_enable=NO

# PAM setting. Do NOT change this unless you know what you do!
#
pam_service_name=vsftpd

# Set listen=YES if you want vsftpd to run standalone
#
# listen=YES
force_dot_files=NO
#listen_address=


Kann mir jemand helfen ? Keine Firewall ist aktiv.....

cero
16.07.06, 14:43
Mit local_root kann man das Verzeichnis fuer lokale user festlegen.
Eine gute Übersicht bietet diese Seite:
http://strcat.pebcak.de/eigenes/vsftp.html

testing
16.07.06, 17:57
hallo,

wie muß ich das mit local_root eingeben, wenn ich z.Bsp einen user habe der testing heißt und wenn mehr als ein user vorhanden ist ?

cero
16.07.06, 18:11
Moment, bin wohl auch etwas durcheinander.
Gib mal chroot_local_user=YES in deiner Config mit an. Damit sollte jeder User
nur in seinem Homeverzeichnis.

Schau dir auch mal diese Anleitung mit an. Dort gibt es auch eine Beispielkonfig:
http://archiv.debianhowto.de/de/vsftpd/installation_konfiguration.html#konfiguration

testing
19.07.06, 23:06
kann es sein, dass man dem vsftp irgendwie mitteilen muß, wo die lokalen Benutzer ihre Passwörter abspeichern ? Bei mir meldet sich mein FTP Client immer noch als anonymous an, obwohl ich es deaktiviert habe........
Was macht eigentlich die Option nopriv_user ?

testing
20.07.06, 15:33
auch sagt mir mein FTP-Client dauernd, dass er nicht in /home/benutzername -Verzeichniss wechseln kann, da es anscheinend nicht existiert, aber es existiert sehr wohl !!!!!!!!

Apoll
20.07.06, 16:04
1. Du brauchst die Datei /etc/vsftpd.user_list, in der alle User vermerkt sind, die sich einloggen dürfen.

2. Alle User müssen (selbstverständlich) auch in der /etc/passwd eingetragen sein. Die Loginshell sollte /bin/false sein, ausser du willst, dass den Usern neben dem FTP-Account noch ein Shell-Account zusteht.

Für die Optionen in der Config selbst hab ich dir mal meine Eigene angehängt.
Meine Version sollte im Großen und Ganzen das können, was du willst..
Lokale User (ohne Loginshell) können sich einloggen und sind in ~ ge-chrootet.
Zudem können User sich wahlweise über SSL oder Plaintext einloggen.

testing
07.08.06, 22:02
wie muß die vsftpd.user_list Datei genau aussehen ? kann mir das einer sagen ? wenn ich zum beispiel 2 benutzer habe mit benutzer1 und benutzer2 ?

chrisfc
07.08.06, 22:29
Wenn du den User "bla" & "lala" addest, sieht die Datei einfach folgendermaßen aus:
bla
lala

:D
Da gabs mal nen recht intressantes einfach aufgebautes Script zum Useradden für vsftpd..



#!/bin/bash

echo -n "Bitte Benutzernamen eingeben: "
read username
echo "Erstelle Benutzer $username..."
useradd -d /home/$username -g ftpgroup -s /bin/false $username
echo "Erstelle Heimatverzeichnis..."
mkdir /home/$username
echo "Setze Benutzerberechtigungen..."
chown nobody:ftpgroup /home/$username
chmod 1770 /home/$username
echo "Erlaube Benutzer den FTP-Zugriff..."
echo $username >> /etc/vsftpd.user_list
echo "Setze Passwort füen Benutzer..."
passwd $username

Ka, ob es deine Bedürfnissen entspricht. :D

testing
08.08.06, 19:30
Das ist nett, ich meinte aber auch nur die lokal angelegte user, das script von dir ist doch für "normale nur ftp benutzer", oder ?

testing
09.08.06, 22:15
ich blick das überhaupt nicht mit dem script ? wie muß ich das script anlegen ? wird die datei vsftp.user-list automatisch dann erstellt ? bitte um vorgehensweise für totalen newbie

testing
12.08.06, 14:39
hallo,

jetzt hab ich warscheinlich mein Hauptproblem gefunden. Wenn ich mich auf dem Client PC im Konqueror als FTP -user einlogge, und dann unter Eigenschaften --> Berechtigungen nachsehe, steht als Benutzer=0 und als Gruppe=0. Normalerweise müßten da doch Benutzer=Benutzername und als Gruppe=users stehen, oder ? Was hab ich da noch falsch gemacht ? Bitte helft mir....................

testing
13.08.06, 20:36
Jetzt tut alles wieder nach einer Neuinstallation. Eine Frage noch, wie müßen die Benutzer genau in die vsftpd_user_list eingetragen werden ? Einfach untereinander, mit ; dahinter, oder wie ?

testing
14.08.06, 21:56
hallo, helft mir bitte mit meiner vsftpd_user_list..............

Tomek
15.08.06, 00:37
Hier mal zwei Anleitungen für vsftpd:

http://strcat.neessen.net/eigenes/vsftp.html
http://archiv.debianhowto.de/de/vsftpd/installation_konfiguration.html

Dexter74
30.08.06, 11:14
Hi,

die kleine Frage. Kann man den Pfad zum Verzeichnis irgendwie ändern? Standard ist ja /home/ftp/ möchte das Verzeichnis aber auf einer anderen Partition haben.

Tomek
30.08.06, 11:28
Dann ändere das Homeverzeichnis des entsprechenden Benutzers.

Dexter74
30.08.06, 16:26
welchen Benutzer meinst du denn?

Ich habe noch keine erstellt und bei der Installation wird ein Benutzer ftp angelegt, dieser Ordner (/home/ftp/) hat aber root:nogroup