PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Wieder FTP :-(



Seiten : [1] 2

verve
23.10.02, 18:18
Hallo Leutz,

also ich hab da so ein Problem! Wenn ich mich bei meinem FTP-Server einloggen will, kommt die Fehlermeldung:


Vergewissern Sie sich ob der Pfad richtig ist oder ob Sie die nötigen Rechte haben!
FTP-Sitzung wurde beendet!


Bis jetzt ging es immer einwandfrei; hab allerdings letzte Zeit paar Einstellungen in der proftpd.conf vorgenommen und vielleicht könnte das daran liegen!
Hier meine aktuelle proftpd.conf:

# 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"/"nogroup" for normal operation and anon.

# !!! PLEASE read the documentation of proftpd !!!
#
# You can find the documentation in /usr/doc/packages/proftpd/,
# http://www.proftpd.org/ and don't forget to read carefully
# and _follow_ hints on http://www.proftpd.net/security.html.

ServerName "ftp-server"
#ServerType inetd
ServerType standalone
ServerAdmin webmaster@name.de
#
# uncomment, if you want to hide the servers name:
#
#ServerIdent on "FTP Server ready"
DeferWelcome off
DefaultServer on

# Enable PAM for authentication...
#
AuthPAM on

# Setting this directive to on will cause authentication to fail
# if PAM authentication fails. The default setting, off, allows
# other modules and directives such as AuthUserFile and friends
# to authenticate users.
#
#AuthPAMAuthoritative off

# This directive allows you to specify the PAM service name used
# in authentication (default is "proftpd" on SuSE Linux).
# You have to setup the service in the /etc/pam.d/<other_name>.
#
#AuthPAMConfig proftpd

# Port 21 is the standard FTP port.
Port 21

# disable listen on 0.0.0.0:21 - the port (and IP) should
# be specified explicitly in each VirtualHost definition
#
#Port 0

# listen for each (additional) address explicitly that is
# specified (via Bind and Port) in a VirtualHost definition
#
#SocketBindTight on


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

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

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

# protect .ftpaccess and similar - see also PathDenyFilter
#<Directory /*.ftp*>
# <Limit ALL>
# DenyAll
# IgnoreHidden on
# </Limit>
#</Directory>

# It is a very good idea to allow only filenames containing normal
# alphanumeric characters for uploads (and not shell code...);
# see also the PathDenyFilter option
#PathAllowFilter ".*/[a-zA-Z0-9]+$"
#PathAllowFilter ".*/[a-zA-Z0-9~ \*\/,_.-]+$"

# Do not allow to pass printf-Formats (see also AllowFilter option):
DenyFilter "%"

# 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

# Performance: skip DNS resolution when we process the logs...
#UseReverseDNS off

# Turn off Ident lookups
IdentLookups off

# Set the maximum number of seconds a data connection is allowed
# to "stall" before being aborted.
#TimeoutStalled 300

# Where do we put the pid files?
ScoreboardPath /var/run/proftpd

#
# Logging options
#
TransferLog /var/log/xferlog

# Some logging formats
#
#LogFormat default "%h %l %u %t \"%r\" %s %b"
#LogFormat auth "%v [%P] %h %t \"%r\" %s"
#LogFormat write "%h %l %u %t \"%r\" %s %b"

# Log file/dir access
#ExtendedLog /var/log/proftpd.access_log WRITE,READ write

# Record all logins
#ExtendedLog /var/log/proftpd.auth_log AUTH auth

# Paranoia logging level....
##ExtendedLog /var/log/proftpd.paranoid_log ALL default

#
# Do a chroot for web-users (i.e. public or www group), but
# do not change root if the user is also in the users group...
#
#DefaultRoot ~/www public,!users
DefaultRoot ~

#Limit login attempts
MaxLoginAttempts 3
# Users needs a valid shell
#RequireValidShell yes

#
# Use special Auth files instead....
#
#AuthUserFile /var/proftpd/authfiles/passwd
#AuthGroupFile /var/proftpd/authfiles/group

#
# Use LDAP server - see README.LDAP
#
#LDAPServer "localhost"
#LDAPPrefix "dc=your,dc=domain,dc=top"
#LDAPDN "cn=YourDNUser,dc=your,dc=domain,dc=top"
#LDAPDNPass "YourDNUserPassword"


# The ratio directives take four numbers: file ratio, initial file
# credit, byte ratio, and initial byte credit. Setting either ratio
# to 0 disables that check.
#
# The directives are HostRatio (matches FQDN -- wildcards are allowed
# in this one), AnonRatio (matches password entered in an anon login,
# usually an email address), UserRatio (accepts "*" for 'any user'),
# and GroupRatio. Matches are looked for in that order.
#
# Some examples:
#
# Ratios on # enable module
# UserRatio ftp 0 0 0 0
# HostRatio anyhost.domain.top 0 0 0 0 # leech access (default)
# GroupRatio proftpd 100 10 5 100000 # 100:1 files, 10 file cred
# AnonRatio auser@domain.top 1 0 1 0 # 1:1 ratio, no credits
# UserRatio * 5 5 5 50000 # special default case
#
# Setting "Ratios on" without configuring anything else will enable
# leech mode: it logs activity and sends status messages to the ftp
# client, but doesn't restrict traffic.


#
# uncomment for anonymous...:
#
<Anonymous ~ftp>
# # After anonymous login, daemon runs as:
User ftp
Group public
#
# # 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 none
#
# # We want 'welcome.msg' displayed at login, and '.message' displayed
# # in each newly chdired directory.
# DisplayLogin msgs/welcome.msg
# DisplayFirstChdir .message
#
# # Deny write operations to all directories, underneath root-dir
# # Default is to allow, so we don't need a <Limit> for read operations.
# <Directory *>
# <Limit WRITE>
AllowAll
# </Limit>
# </Directory>
# #
# # Only uploads into incomming directory are allowed...
# #<Directory incoming>
#
Umask 017
# #
# # # ... so deny read/write
# # <Limit READ WRITE DIRS>
AllowAll
# # </Limit>
# #
# # # ... allow file storing, but not other writes
# # <Limit STOR CWD CDUP>
# # AllowAll
# # </Limit>
# #
# #</Directory>
#
</Anonymous>

Ich hab ja schon so Dokus gelesen und so, aber es klappt nichts!
Seht ihr hier einen Fehler drinne? Wenn ja, dann bitte ich euch doch zu antworten!
Danke!

greetings

verve

Drimacus
23.10.02, 23:40
Als was wolltest du dich einloggen, Anonymous oder als User?

verve
24.10.02, 14:43
Hi,

danke für deine Antwort ;)

User sollten sich einloggen. Wenn man zum Beispiel im IE ftp://meineip eingibt, sollte normaler weise ja der Login kommen! Doch es kommt einfach die Fehlermeldung FTP-Sitzung wurde beendet!
Anonymous sollte sich eigentlich nicht einloggen können.

Der FTP Login funktioniert ja eigentlich schon, nur nachdem ich ein bisschen damit rumgespielt habe, hatte dies nicht mehr funktioniert. Woran kann das liegen ?!?

Ich hoffe, ihr könnt mir bei meinem Problem weiterhelfen !

greetings

verve

feuerwand
24.10.02, 15:24
Hallo,
Den Bereich von <Anonymous ~ftp> bis </Anonymous> loeschst du einfach aus deiner Konfig, wenn du keinen Anonymous-Zugang haben willst.


Wenn du damit ein wenig herumgespielt hast, sollte sich ein backup finden lassen: /etc/proftpd.conf~
Das solltest du allerdings ueberpruefen, bevor du weitere Aenderungen daran vornimmst ; )

Und jetzt die ganze Config mal etwas uebersichtlicher:
Die Kommentare laesst man beim Posten am besten weg ; )



ServerName "ftp-server"
ServerType standalone
ServerAdmin webmaster@name.de
#ServerIdent on "FTP Server ready"
DeferWelcome off
DefaultServer on
AuthPAM on
#AuthPAMAuthoritative off
#AuthPAMConfig proftpd
Port 21
#SocketBindTight on
Umask 022

User nobody
Group nogroup

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

#PathAllowFilter ".*/[a-zA-Z0-9]+$"
#PathAllowFilter ".*/[a-zA-Z0-9~ \*\/,_.-]+$"
DenyFilter "%"

MaxInstances 30
#UseReverseDNS off
IdentLookups off
#TimeoutStalled 300
ScoreboardPath /var/run/proftpd

TransferLog /var/log/xferlog
#LogFormat default "%h %l %u %t \"%r\" %s %b"
#LogFormat auth "%v [%P] %h %t \"%r\" %s"
#LogFormat write "%h %l %u %t \"%r\" %s %b"
#ExtendedLog /var/log/proftpd.access_log WRITE,READ write
#ExtendedLog /var/log/proftpd.auth_log AUTH auth
##ExtendedLog /var/log/proftpd.paranoid_log ALL default

DefaultRoot ~
MaxLoginAttempts 3
#RequireValidShell yes



Und dann kannste ja mal deine jetzige Config durch diese ersetzen (ich hab da mal bissl dranrumgebastelt...*fg*):


ServerName "ftp-server"
ServerType standalone
ServerAdmin webmaster@name.de
ServerIdent on "FTP Server ready"
DeferWelcome off
DefaultServer on
AuthPAM on
AuthPAMAuthoritative on
AuthPAMConfig proftpd
Port 21

Umask 022
User nobody
Group nogroup

<Directory /*>
AllowOverwrite on
HiddenStor on
#HideNoAccess on
</Directory>

#PathAllowFilter ".*/[a-zA-Z0-9]+$"
#PathAllowFilter ".*/[a-zA-Z0-9~ \*\/,_.-]+$"
DenyFilter "%"

MaxInstances 30
#UseReverseDNS off
IdentLookups off
#TimeoutStalled 300
ScoreboardPath /var/run/proftpd

TransferLog /var/log/xferlog
LogFormat default "%h %l %u %t \"%r\" %s %b"
ExtendedLog /var/log/proftpd.log all default

DefaultRoot ~
MaxLoginAttempts 3
RequireValidShell no

verve
24.10.02, 16:14
Hi,

also soll ich nur RequireValidShell auf no setzen?
Dies hab ich gemacht, funktioniert aber nicht! Den anonymousbereich hab ich auch weggemacht, doch der Fehler bleibt derselbe:
Auf diesen Ordner kann nicht zugégriffen werden. Vergewissern Sie sich, dass der Dateiname richtig angegeben wurde, und dass Sie über die nötigen Zugriffsberechtigungen verfügen!
Habt ihr eine Idee? Hat vielleicht jemand von euch schon mal diesen Fehler gehabt?

greetings

verve

feuerwand
24.10.02, 16:18
Hast du die korrekten Rechte im Dateisystem eingestellt?
Dein Directory Bereich fehlt uebrigens auch:

verve
24.10.02, 16:24
hallo feuerwand,

danke für deine prompte Antwort!
Welche Rechte meinst du jetzt genau und wie sollten sie eingestellt sein?
Wo fehlt denn mein Directory-Bereich? Könntest du mir noch die Stelle sagen, wo ich was hinzufügen soll!
Wäre dir sehr dankbar!

greetings

verve

feuerwand
24.10.02, 16:56
Der "Directory Bereich" in der Konfig legt die Rechte fest.
Dieser sieht dann in etwa so aus:

<Directory /upload> #Pfad zum Verzeichnis

<Limit WRITE STOR MKD> # Hier werden die Aktionen aufgezaehlt, die erlaubt sind
AllowAll

<Limit RMD READ> # Hier werden die Aktionen aufgezaehlt, die verboten sind
Denyall

</Directory>



Und koenntest du mal bitte mit einem brauchbaren FTP-Clienten drauf und dann die Fehlermeldung posten. I.E. ist dafuer definitiv nicht brauchbar (eigentlich fuer gar nichts)

verve
24.10.02, 17:07
HI!

danke für deine Antwort ;)

Also beim upload würd ich dann /usr/local/httpd/htdocs als pfad angeben, doch wieso ist read als verboten angezeigt? Ist das so richtig?

Ich versteh das ganze nicht so richtig ;)
Hoffe, du antwortest wieder ;)

greetings
verve

PS: Hier die Fehlermeldung von SmarFTP:
Resolving host name MeinHost...
Connecting to (MeinHost).
Connected to (MeinHost) -> IP: MeineIP PORT: 21.
Socket connected waiting for login sequence.
Cannot login waiting to retry...
Continue to login attempt 2...
Connecting to (MeinHost).
Connected to (MeinHost) -> IP: MeineIP PORT: 21.
Socket connected waiting for login sequence.
Cannot login waiting to retry...
Continue to login attempt 3...
Connecting to (MeinHost).
Connected to (MeinHost) -> IP: MeineIP PORT: 21.
Socket connected waiting for login sequence.
Cannot login waiting to retry...
Continue to login attempt 4...

feuerwand
24.10.02, 17:56
Das oben war ja nur ein Beispiel. Du musst das schon anpassen!:rolleyes:
Das Problem ist hier aber ein ganz anderes. Der Nutzer kann sich ja nichtmal anmelden.

verve
24.10.02, 18:15
Hallo feuerwand,

das Problem ist ein ganz anderes?
Hast du vielleicht eine Idee, wie ich das behebe?
Reichen die Einstellungen, also directory upload/ etc...
irgendwo in der proftpd.conf zuzufügen!
Wäre dankbar für deine Antwort!

greetings

verve

feuerwand
24.10.02, 18:41
Schau mal in den logs, was da steht. Vielleicht gibt das ja Aufschliss *hoff* :confused:

verve
24.10.02, 19:37
hi feuerwand;) ;) ,

In der Xconsole hab ich jetzt den folgenden Fehler entdeckt:

proftpd [Nr.] : ... - failed binding to 0.0.0.0, port 21: Addresss already in use
proftpd [Nr.]: ....- Check the ServerType directive to ensure you are configured correctly.

Als Servertype haben wir in der proftpd.conf "standalone" und eigentlich hat es so auch immer funktioniert!

greetings

verve

feuerwand
24.10.02, 19:46
>proftpd [Nr.] : ... - failed binding to 0.0.0.0, port 21: Addresss already in use

Hast du einen anderen Dienst laufen, der Port 21 benutzt?

verve
24.10.02, 19:54
Hi!

nicht, das ich wüßte. Kann man sich das vielleicht anschauen, wer welche ports nutzt?!?
Oder welcher Dienst könnte das sein?

Hoffe, das wir jetz voran kommen ;)

greetings
verve

feuerwand
24.10.02, 20:05
In der Regel laeuft auf diesem Port nur FTP.
Beende mal ProFTPD und dann gebe das ein:
ps -ax | grep *ftp

verve
24.10.02, 20:10
Hi!

wenn ich dies nach dem beenden von proftpd eingebe kommt:

4306 pts/1 S 0:00 grep *ftp

Hat das irgendwas zu bedeuten?!?

greetings

verve

feuerwand
24.10.02, 20:50
Nein, das lag an dem obigen Befehl. Er durchsuchte die Ausgabe nach *ftp.
Hast du vielleicht irgendwas ueber inetd laufen?
Und was ist mit dem Backup der alten Konfig?

verve
24.10.02, 20:54
Hi,

ich habe fam über inetd laufen, doch es funktionierte sonst immer beides! fam nutze ich im moment auch nicht!
Das Backup funktioniert auch nicht, den eigentlich ist ja alles richtig in der proftpd eingestellt! Ich weiß nicht, wieso er der ftp nicht funktioniert!

greetings
verve

slime
25.10.02, 13:19
mach doch einfach mal ftp localhost,, dann siehst du ja ob da noch was läuft.
dann lad dir eine datei von deinem ftp und kuck mit lsof nach welches programm das ist.
dann kannst du ja finden welches prog auf port21 läuft.

verve
25.10.02, 23:30
danke allen!
Es funtioniert jetzt schon halbwegs!
Ich kann mich einloggen und etwas herunterladen!
Doch meine großes problem:

ICH KANN NICHTS UPLOADEN! :-(
Es kommt immer die Fehlermeldung: ...keine Rechte!

Hier meine proftpd.conf (ohne kommentare!):

ServerName "ftpserver"
#ServerType inetd
ServerType standalone
ServerAdmin webmaster@name.de

#ServerIdent on "FTP Server ready"
DeferWelcome off
DefaultServer on


AuthPAM on
#AuthPAMAuthoritative off
#AuthPAMConfig proftpd

Port 21
#Port 0

#SocketBindTight on

Umask 022
User nobody
Group nogroup

# Normally, we want files to be overwriteable.
<Directory /*>
AllowOverwrite on
HiddenStor on
#HideNoAccess on
<Limit SIZE>
DenyAll
</Limit>
</Directory>

# protect .ftpaccess and similar - see also PathDenyFilter
#<Directory /*.ftp*>
# <Limit ALL>
# DenyAll
# IgnoreHidden on
# </Limit>
#</Directory>

#PathAllowFilter ".*/[a-zA-Z0-9]+$"
PathAllowFilter ".*/[a-zA-Z0-9~ \*\/,_.-]+$"

AllowFilter "^[a-zA-Z0-9@~' \*\/,_.-]*$"
DenyFilter "%"

MaxInstances 30

#UseReverseDNS off

IdentLookups off

#TimeoutStalled 300

ScoreboardPath /var/run/proftpd

TransferLog /var/log/xferlog

#LogFormat default "%h %l %u %t \"%r\" %s %b"
#LogFormat auth "%v [%P] %h %t \"%r\" %s"
#LogFormat write "%h %l %u %t \"%r\" %s %b"

#ExtendedLog /var/log/proftpd.access_log WRITE,READ write

#ExtendedLog /var/log/proftpd.auth_log AUTH auth


##ExtendedLog /var/log/proftpd.paranoid_log ALL default

#DefaultRoot ~/www public,!users
DefaultRoot ~

#Limit login attempts
#MaxLoginAttempts 3
# Users needs a valid shell
#RequireValidShell yes

#AuthUserFile /var/proftpd/authfiles/passwd
#AuthGroupFile /var/proftpd/authfiles/group

#LDAPServer "localhost"
#LDAPPrefix "dc=your,dc=domain,dc=top"
#LDAPDN "cn=YourDNUser,dc=your,dc=domain,dc=top"
#LDAPDNPass "YourDNUserPassword"

# Ratios on # enable module
# UserRatio ftp 0 0 0 0
# HostRatio anyhost.domain.top 0 0 0 0 # leech access (default)
# GroupRatio proftpd 100 10 5 100000 # 100:1 files, 10 file cred
# AnonRatio auser@domain.top 1 0 1 0 # 1:1 ratio, no credits
# UserRatio * 5 5 5 50000 # special default case


<Anonymous ~ftp>
User ftp
Group public
UserAlias anonymous ftp
MaxClients 10
DisplayLogin msgs./welcome.msg
DisplayFirstChdir .message
<Directory *>
<Limit SIZE WRITE>
DenyAll
</Limit>
</Directory>
<Directory incoming>
Umask 017
<Limit READ WRITE DIRS>

DenyAll

</Limit>

<Limit STOR CWD CDUP>

AllowAll

</Limit>
</Directory>
</Anonymous>
<Global>
</Global>


Wo könnte der Fehler liegen? Bitte schreibt, wenn ihr euch da auskennt ;)

greetings

verve

PS: wie kann ich mail an root lesen???

feuerwand
26.10.02, 00:01
>Hier meine proftpd.conf (ohne kommentare!):

Danke ; )

Ich denke mal, dass du in /incoming was uppen willst, oder?



<Directory incoming>
Umask 017

<Limit READ DIRS> <i># du darfst das Schreiben nicht verbieten. "WRITE" stand da noch</i>
DenyAll
</Limit>

<Limit WRITE STOR CWD CDUP>
AllowAll
</Limit>

HangLoose
26.10.02, 00:02
hi

zu den mails => wechsel mal mit strg+alt+f1 auf eine andere konsole und log dich als root ein, danach einfach mail eintippen und dann die entsprechende nummer.

ftp => kann es sein, das du die upload-directory's erstmal definieren mußt. ich weiß nicht, ob ich folgenden link schon mal gepostet habe => http://www.3d-crew.com/eigenes/ftp/index.html


Gruß HangLoose

verve
26.10.02, 00:22
Hi,

danke für eure schnelle antworten!


@feuerwand
Dies hat leider nichts gebracht. Dies gilt glaube ich doch auch nur für anonym oder?
Mein Problem ist, das User, die sich über ftp einloggen, keine Dateien hochladen können, da sie angeblich keine rechte dazu haben.
Wo könnte noch der fehler liegen?!?

@HangLoose
Danke für die URL, doch dort unter dem link upload-directory's wird beschrieben, wie man eine Uploadbegrenzung einrichtet. Das wäre dann vielleicht der nächste Schritt, aber der ftp muss doch auch ohne Begrenzung funktionieren!

greetings

verve

feuerwand
26.10.02, 00:28
>Dies hat leider nichts gebracht. Dies gilt glaube ich doch auch nur für anonym oder?
Mein Problem ist, das User, die sich über ftp einloggen, keine Dateien hochladen können, da sie angeblich keine rechte dazu haben.
Wo könnte noch der fehler liegen?!?


Ja, das liegt daran, dass es sich im AnonymousPart befindet...
Setze das in den globalen Abschnitt.

verve
26.10.02, 00:29
heißt das, das gehört nicht ins anonym?
Wie würde es dann aussehen, wo kommt das dann hin ?!?

feuerwand
26.10.02, 00:30
Könntest du mir auch mal sagen, wie das jetzt am Ende aussehen soll?
Welcher Nutzer darf in welchem Verzeichnis was machen?
Dann kann ich dir weiterhelfen.

verve
26.10.02, 00:33
naja, es gibt ein paar Nutzer und jeder Nutzer hat seinen eigenen Ordner im /usr/local/httpd/htdocs/.
Über FTP sollten diese Nutzer nun auf Ihre Ordner zugreifen können und uploaden,löschen lesen können.
Der download von dateien funktioniert, doch wenn ein nutzer versucht etwas hochzuladen, kommt das er keine erlaubnis hat.

Ich kopiere den limit teil jetzt mal in global ... mal schauen ;)

verve
26.10.02, 00:36
also das ende meiner proftpd.conf sieht jetzt so aus
<Global>

<Directory incoming>
Umask 017

<Limit READ DIRS>
DenyAll
</Limit>

<Limit WRITE STOR CWD CDUP>
AllowAll
</Limit>
</Global>

wenn ich jetzt proftpd neu starte bekomme ich eine fehlermeldung, das ich den directory eintrag nicht in global haben darf:
Relativer Pfadname auserhalb des Anonymen Blocks nicht erlaubt

feuerwand
26.10.02, 00:36
Ok, schonmal nen Anfang.
Das heißt, dass jeder Nutzer in seiner Root die oben gennanten Rechte hat.
Und was ist mit dem Anoynmous-Nutzer? Es ist unklug, ihm die gleichen Rechte zu geben, da dein FTP sonst als "Pub" (=FTP Server mit anonymen Zugang und Schreibrechten; wird als Zwischenstation fuer die Verbreitung von Warez, Movies und Mp3s genutzt) genutzt wird.