Weg von pureFTP zu SFTP

ProFTPd, vsftpd, pure-ftpd
User avatar
Proteus
Posts: 289
Joined: 2013-04-14 05:08
Location: Holzgerlingen
 

Weg von pureFTP zu SFTP

Post by Proteus »

Hallo,

ich möchte gerne weg von FTP und zukünftig auf SFTP setzten.

Auszug von meiner sshd_conf:

Code: Select all

Subsystem sftp internal-sftp -u 0027

AllowGroups wheel admin sshusers sftponly

Match User root
    ChrootDirectory none
    PasswordAuthentication no

Match Group admin
    ChrootDirectory none
    PasswordAuthentication no

Match Group sshusers
    ChrootDirectory none
    PasswordAuthentication no

Match Group sftponly
    ChrootDirectory /home
    PasswordAuthentication yes
    ForceCommand internal-sftp -d %u
Was muss ich tun damit der Pfad auf /usr/local/www/phoenix angenommen, der User und die Gruppe besteht, wird ohne Passwort, da sonst mein Wordpress nicht aktualisieren kann. Und ungerne möchte ich in irgendeiner *php einen Schlüssel für die Authentifizierung hinterlegen.
LG
Proti

"Die Kamera wird bei hohen ISO Werten aber rauschen. Nichts ahnend hielt er sich die Kamera ans Ohr!"
User avatar
Proteus
Posts: 289
Joined: 2013-04-14 05:08
Location: Holzgerlingen
 

Re: Weg von pureFTP zu SFTP

Post by Proteus »

Ich hab es nun so gemacht. Zumindest funktioniert es so. Bitte berichtigen wenn ich falsch liege.

Code: Select all

Subsystem sftp internal-sftp -u 0027

AllowGroups wheel admin phoenix sshusers sftponly

Match User root
    ChrootDirectory none
    PasswordAuthentication no

Match Group admin
    ChrootDirectory none
    PasswordAuthentication no

Match Group phoenix
    ChrootDirectory /usr/local/www/phoenix/
    PasswordAuthentication no

Match Group sshusers
    ChrootDirectory none
    PasswordAuthentication no

Match Group sftponly
    ChrootDirectory /home
    PasswordAuthentication yes
    ForceCommand internal-sftp -d %u
LG
Proti

"Die Kamera wird bei hohen ISO Werten aber rauschen. Nichts ahnend hielt er sich die Kamera ans Ohr!"
User avatar
Joe User
Project Manager
Project Manager
Posts: 11186
Joined: 2003-02-27 01:00
Location: Hamburg
 

Re: Weg von pureFTP zu SFTP

Post by Joe User »

Passt so.
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
User avatar
Proteus
Posts: 289
Joined: 2013-04-14 05:08
Location: Holzgerlingen
 

Re: Weg von pureFTP zu SFTP

Post by Proteus »

Ich werde es einfach nie schnallen, wie das mit den umask bzw. chmod richtig funktioniert. Ich möchte doch einfach lediglich das die Rechte richtig gesetzt werden. Jedesmal muss ich meine Verzeichnisse und Dateien auf 777 setzten damit etwas geschrieben wird. So nervt es einfach mal.

Wenn ich etwas installiere setzte ich alle meine Verzeichnisse und Daten mit folgenden Befehlen:

Code: Select all

find * -type d -exec chmod 0777 {} \;
find * -type f -exec chmod 0777 {} \;
um, und nach dem ich was geändert habe wieder auf die Standardwerte zurück:

Code: Select all

find * -type d -exec chmod 0755 {} \;
find * -type f -exec chmod 0644 {} \;
LG
Proti

"Die Kamera wird bei hohen ISO Werten aber rauschen. Nichts ahnend hielt er sich die Kamera ans Ohr!"