SFTP Download & Xampp

F

f4ker

Jungspund
Guten Tag miteinander

Ich habe momentan ein SLES 10 am laufen, auf welchem das komplette XAMPP Paket draufinstalliert ist. Nun, der FTP Server läuft prima, wie kann ich aber anstatt FTP, dass sicherere SFTP benutzen? Gibts da eine einfache Möglichkeit das zu realisieren? Als FTP Deamon läuft proFTPd .....

die proftpd.conf sieht folgendermassen aus:

Code:
# This is a basic ProFTPD configuration file (rename it to 
# 'proftpd.conf' for actual use.  It establishes a single server
# and a single anonymous login.  It assumes that you have a user/group
# "nobody" and "ftp" for normal operation and anon.

ServerName			"ProFTPD Default Installation"
ServerType			standalone
DefaultServer		on

# Port 21 is the standard FTP port.
Port				21

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

# 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 under which the server will run.
User				nobody
Group				nogroup

# To cause every FTP user to be "jailed" (chrooted) into their home
# directory, uncomment this line.
#DefaultRoot ~

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

# A basic anonymous configuration, no upload directories.  If you do not
# want anonymous users, simply delete this entire <Anonymous> section.
<Anonymous /link/to/downloads>
  User				ftp
  Group				ftp

  # 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			5

  # We want 'welcome.msg' displayed at login, and '.message' displayed
  # in each newly chdired directory.
  DisplayLogin			welcome.msg
  DisplayFirstChdir		.message

  # Limit WRITE everywhere in the anonymous chroot
  <Limit WRITE>
    DenyAll
  </Limit>
</Anonymous>

Danke schonmal & freundliche Grüsse
 
Zuletzt bearbeitet:
Wenn du xampp im Internet am laufen hast dann lösch es denn das hat da aus Sicherheitsgründen überhaupt nichts verloren.
 
Hm .... oke danke erstmal für die Hinweise! kann ich dann die Dateien ganz normal über sftp://10.0.0.1/bla.jpg runterladen (Im Browser)?

Gruss
 
Konqueror und Dolphin können das.

Wenn die denn als Browser durchgehen.
 
Hmm ..... ja mal schauen ..... evtl bleib ich bei ftp ....
 
Noch kurz ne Frage zu proFTPd Konfiguration .... momentane proftpd.conf sieht folgendermassen aus:

Code:
ServerName			"ProFTPD Default Installation"
ServerType			standalone
DefaultServer		on

Port				21

Umask				022

MaxInstances		30

User				ftpupload
Group				ftpupload

DefaultRoot /data/downloads

<Directory /data/downloads>
	AllowOverwrite		on
	
	<Limit LOGIN>
		AllowUser ftpupload
		DenyAll
	</Limit>
	
	<Limit WRITE>
		AllowUser ftpupload
		DenyAll
	</Limit>
	
</Directory>

<Anonymous /data/downloads>
	User				ftp
	Group				ftp

	UserAlias			anonymous ftp

	MaxClients			5

	DisplayLogin		welcome.msg
	DisplayFirstChdir	.message
	
	<Limit WRITE>
		DenyAll
	</Limit>
</Anonymous>

Nun, anonymer Login funktioniert, ich werde auch in das Verzeichnis /data/downloads weitergeleitet und habe keine schreibrechte .... soweit so gut , nun will ich aber noch einen User (ftpupload), welcher die Möglichkeit hat, sich einzuloggen und der hat dann Schreibrechte in diesem /data/downloads ..... Im moment kann sich jeder User, welcher Systemseitig erfasst ist, einloggen und hat Schreibrechte in diesem Verzeichnis ....

Danke & Gruss schonmal
 
Gibt es eine Möglichkeit den Download bzw. Upload nur über SFTP durchzuführen .... ? FTP also nicht erlauben

Danke schonmal & Gruss
 
den FTP-Daemon deinstallieren und den SSHd das ganze erledigen lassen :P
 
...... VIELEN DANK :)

Gibt es dann aber auch die Möglichkeit den User einzuschränken? Also dass dieser nur auf ein gewisses Verzeichnis Zugriff hat?

Mit freundlichen Grüssen
 
Bei Debian gibt es scponly als shell und dazu gibt es ein Script für das chroot von Usern.
Lässt sich mit apt installieren.
 
Suche mal bei der Suchmaschiene deiner Wahl nach "SSH match chroot". Solltest was finden
 
Suche mal bei der Suchmaschiene deiner Wahl nach "SSH match chroot". Solltest was finden

Hm , ok vielen Dank! Nunja, ich habe bis jetzt folgende Schritte vollzogen:

In /etc/ssh/sshd_config folgende Zeilen hinzugefügt:

Subsystem sftp internal-sftp

Match group ftp
ChrootDirectory /data/downloads
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp


Danach das Verzeichnis /data/downloads dem root untergeordnet:

chown root:root /data/downloads


Wenn ich mich nun z.B. über WinSCP einlogge, so kann ich das Verzeichnis /data/downloads immernoch verlassen, was ich aber eigentlich nicht will!

Was habe ich falsch gemacht?

Danke schonmal & Gruss
.
.
.
EDIT (autom. Beitragszusammenführung) :
.

btw. habe OpenSSH Version 4.3 .... mit der funktioniert es glaubich nichtmal
 
Zuletzt bearbeitet:
Hm , ok vielen Dank! Nunja, ich habe bis jetzt folgende Schritte vollzogen:

In /etc/ssh/sshd_config folgende Zeilen hinzugefügt:

Subsystem sftp internal-sftp

Match group ftp
ChrootDirectory /data/downloads
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp


Danach das Verzeichnis /data/downloads dem root untergeordnet:

chown root:root /data/downloads


Wenn ich mich nun z.B. über WinSCP einlogge, so kann ich das Verzeichnis /data/downloads immernoch verlassen, was ich aber eigentlich nicht will!

Was habe ich falsch gemacht?

Danke schonmal & Gruss
.
.
.
EDIT (autom. Beitragszusammenführung) :
.

btw. habe OpenSSH Version 4.3 .... mit der funktioniert es glaubich nichtmal

Ja, geht iirc erst ab 4.9. (Besser spät als garnicht antworten :D)
 

Ähnliche Themen

Zugriff Ubuntu 16.04. auf Freigabe 18.04. LTS nicht möglich

Senior System & Network Admin in Berlin

Samba 4 Gast Zugang unter Ubuntu funktioniert nicht

dovecot und postfix Konfiguration Problem

JBidWatcher: Problem bei loading Auctions in Verbindung mit mySQL

Zurück
Oben