drwindows97
Goto Top

Proftpd lässt mich nicht rein

Hallo Administratoren,
ersteinmal wünsche ich allen ein frohes neues Jahr !

Wieder einmal brauche ich eure Hilfe und zwar habe ich hier einen Batelrechner als Webserver eingerichtet.
Nun wollte ich dort einen FTP-Server mittels Proftpd realisieren. Die Installation verlief auch reibungslos, allerdings beiße ich mir an der Konfiguration die Zähne aus.

Ich habe ihn so konfiguriert, dass er nur virtuelle Benutzer reinlassen soll. Allerdings verweigert er mir nun bei jedem Loginversuch via Filezilla den Zugriff. (Fehler 530: Login incorrect) Benutzername und Passwort stimmen aber.

Im Log steht dazu folgendes:
Jan 02 13:27:33 192.168.0.101 proftpd[3297] 192.168.0.101 ProFTPD 1.3.4a (maint) (built Sat Sep 28 2013 19:26:56 UTC) standalone mode STARTUP
Jan 02 13:27:43 192.168.0.101t proftpd[3315] 192.168.0.101 (client.box[192.168.0.102]): FTP session opened.
Jan 02 13:27:44 192.168.0.101 proftpd[3315] 192.168.0.101 (client.box[192.168.0.102]): USER noone222: no such user found from client.box[192.168.0.102] to ::ffff:192.168.0.101:21
Jan 02 13:27:44 192.168.0.101 proftpd[3315] 192.168.0.101 (client.box[192.168.0.102]): FTP session closed.

Die Konfig sieht so aus:
#
# /etc/proftpd/proftpd.conf -- This is a basic ProFTPD configuration file.
# To really apply changes reload proftpd after modifications.
# 

# Includes DSO modules
Include /etc/proftpd/modules.conf

# Set off to disable IPv6 support which is annoying on IPv4 only boxes.
#UseIPv6				on

ServerName			"192.168.0.101 FTP Server"
ServerType			standalone
DeferWelcome			off

MultilineRFC2228		on
DefaultServer			on
ShowSymlinks			on

TimeoutNoTransfer		600
TimeoutStalled			600
TimeoutIdle			1200

DisplayLogin                    welcome.msg
DisplayChdir               	.message true
ListOptions                	"-l"

DenyFilter			\*.*/

# Use this to jail all users in their homes 
#DefaultRoot			/var/www

# Users require a valid shell listed in /etc/shells to login.
# Use this directive to release that constrain.
#RequireValidShell		off

# Port 21 is the standard FTP port.
Port				21

# In some cases you have to specify passive ports range to by-pass
# firewall limitations. Ephemeral ports can be used for that, but
# feel free to use a more narrow range.
# PassivePorts                  49152 65534

# If your host was NATted, this option is useful in order to
# allow passive tranfers to work. You have to use your public
# address and opening the passive ports used on your firewall as well.
# MasqueradeAddress		1.2.3.4

# This is useful for masquerading address with dynamic IPs:
# refresh any configured MasqueradeAddress directives every 8 hours
<IfModule mod_dynmasq.c>
# DynMasqRefresh 28800
</IfModule>

# 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				www-data
Group				nogroup

# Umask 022 is a good standard umask to prevent new files and dirs
# (second parm) from being group and world writable.
Umask				022  022
# Normally, we want files to be overwriteable.
AllowOverwrite			on

# Uncomment this if you are using NIS or LDAP via NSS to retrieve passwords:
# PersistentPasswd		off

# This is required to use both PAM-based authentication and local passwords
#AuthOrder			mod_sql.c mod_auth_pam.c* mod_auth_unix.c

# Be warned: use of this directive impacts CPU average load!
# Uncomment this if you like to see progress and transfer rate with ftpwho
# in downloads. That is not needed for uploads rates.
#
# UseSendFile			off

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

# Allow up- and downloads to be continued
AllowRetrieveRestart	On
AllowStoreRestart		On

<IfModule mod_quotatab.c>
QuotaEngine on
</IfModule>

<IfModule mod_ratio.c>
Ratios off
</IfModule>


# Delay engine reduces impact of the so-called Timing Attack described in
# http://security.lss.hr/index.php?page=details&ID=LSS-2004-10-02
# It is on by default. 
<IfModule mod_delay.c>
DelayEngine off
</IfModule>

<IfModule mod_ctrls.c>
ControlsEngine        off
ControlsMaxClients    2
ControlsLog           /var/log/proftpd/controls.log
ControlsInterval      5
ControlsSocket        /var/run/proftpd/proftpd.sock
</IfModule>

<IfModule mod_ctrls_admin.c>
AdminControlsEngine off
</IfModule>

#
# Alternative authentication frameworks
#
#Include /etc/proftpd/ldap.conf
Include /etc/proftpd/sql.conf

#
# This is used for FTPS connections
#
#Include /etc/proftpd/tls.conf

DefaultRoot ~
AuthUserFile /etc/proftpd/ftpd.passwd
AuthPAM off
RequireValidShell off

Was mache ich falsch ?

Content-Key: 225712

Url: https://administrator.de/contentid/225712

Ausgedruckt am: 28.03.2024 um 14:03 Uhr

Mitglied: aqui
aqui 02.01.2014 aktualisiert um 13:48:17 Uhr
Goto Top
Nur mal dumm nachgefragt: Nach dem Einrichten der User hast du proftpd da neu gestartet ??
Ansonsten die Schritte nochmal nachlesen:
http://filzo.de/2008/06/02/how-to-proftpd-mit-virtuellen-usern/
http://wiki.ubuntuusers.de/ProFTPD
usw. usw.
Mitglied: sk-it83
sk-it83 02.01.2014 um 13:51:00 Uhr
Goto Top
Hi,

wo hast du den Benutzer Noone22 den angelegt?
Mitglied: DRwindows97
DRwindows97 02.01.2014 aktualisiert um 14:14:15 Uhr
Goto Top
Den Dienst habe ich nach dem Konfigurieren neugestartet ich habe sogar den Server neugestartet, und den Benutzer habe ich als virtuellen Benutzer mit
sudo ftpasswd --passwd --name noone222 --uid 33 --gid 33 --home /var/www/wordpress/ --shell /bin/false

angelegt.
Mitglied: sk-it83
Lösung sk-it83 02.01.2014 aktualisiert um 15:15:56 Uhr
Goto Top
Pass mal deine Konfig an.

So:

DefaultRoot ~
AuthOrder mod_auth_file.c mod_auth_unix.c
AuthUserFile /etc/proftpd/ftpd.passwd
AuthPAM off
RequireValidShell off
Mitglied: aqui
aqui 02.01.2014 aktualisiert um 14:30:13 Uhr
Goto Top
Hast du das Kommando im Verzeichnis /etc/proftpd/ ausgeführt wie es gefordert ist ?
33 ist ebenso eine etwas ungewöhnliche UID. Eine GID muss man gar nicht angeben und solltest du erstmal lassen. Es ist ja offensichtlich das der User "noone222" gar nicht existent ist also gar nicht angelegt wurde oder falsch angelegt wurde !
Also ins /etc/proftpd wechseln und dort dann mal
ftpasswd --passwd --name noone222 --uid 1010 --home /var/www/wordpress --shell /bin/false

eingeben und nochmal checken.
Mitglied: DRwindows97
DRwindows97 02.01.2014 um 14:55:14 Uhr
Goto Top
Ja ich habe es in /etc/proftpd/ ausgeführt und die Uid ist des Benutzers www-data
Mitglied: sk-it83
sk-it83 02.01.2014 aktualisiert um 15:01:15 Uhr
Goto Top
Konfig auch angepasst?

Es gibt auch eine GUI dafür, vllt. hilft die dir weiter.

gadmin-proftpd
Mitglied: DRwindows97
DRwindows97 02.01.2014 aktualisiert um 15:15:11 Uhr
Goto Top
Ich habe gerade nochmal alles überprüft und angepasst.

Jetzt meldet er:
Status:	Verbindungsversuch fehlgeschlagen mit "ECONNREFUSED - Connection refused by server".
Fehler:	Herstellen der Verbindung zum Server fehlgeschlagen


Hier hat eine Neuinstallation wuder gewirkt, danke für eure Hilfe !
Mitglied: sk-it83
sk-it83 02.01.2014 um 15:10:11 Uhr
Goto Top
Flush ma deinen DNS