Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 16/09/2018, à 09:21

afaverot

[Workaround found] SFTP server ChRootDirectory sur autre disque

Bonjour
J'ai un Ubuntu desktop installé sur un disque.
J'ai par la suite installé 2 autres disques que j'ai monté en Raid 1 via mdadm.
tout fonctionne bien.

J'ai un serveur SFTP configuré et j'arrive à m'y connecter , j'arrive sur le /home de mon user .
Mais je souhaite avoir un compte "sftpuser" qui puisse se connecter et arriver dans le disque "Raid" (pour sécuriser les données j'y copie).

sur mon disque raid j'ai un dossier SFTP_Root qui appartient au root.

drwxr-xr-x 3 root     root      4096 Sep 14 18:06 SFTP_Root/

dans ce dossier j'ai fait un dossier "sftpuser" qui appartient à mon user "sftpuser" et au groupe "sftp"

drwxrwxrwx 2 sftpuser sftp 4096 Sep 14 18:06 sftpuser/

j'ai essayé différentes configs ou droits , rien n'y fait

--> mon utilisateur essaie de se connecter (via un windows et winscp)  , erreur d'authentification

Match Group sftp
#ChrootDirectory /mnt/c8e682db-23b8-4895-874c-b11599f190d3/SFTP_Root/
ChrootDirectory /media/raid/SFTP_Root/
#ChrootDirectory /home
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp
2018-09-16 10:16:31.293 Waiting for the server to continue with the initialization
. 2018-09-16 10:16:31.293 Looking for incoming data
. 2018-09-16 10:16:31.293 Looking for network events
. 2018-09-16 10:16:31.424 Detected network event
. 2018-09-16 10:16:31.424 Enumerating network events for socket 1864
. 2018-09-16 10:16:31.424 Enumerated 1 network events making 1 cumulative events for socket 1864
. 2018-09-16 10:16:31.424 Handling network read event on socket 1864 with error 0
! 2018-09-16 10:16:31.425 Using username "sftpuser".
. 2018-09-16 10:16:31.456 Waiting for the server to continue with the initialization
. 2018-09-16 10:16:31.456 Looking for incoming data
. 2018-09-16 10:16:31.456 Looking for network events
. 2018-09-16 10:16:31.501 Detected network event
. 2018-09-16 10:16:31.501 Enumerating network events for socket 1864
. 2018-09-16 10:16:31.501 Enumerated 1 network events making 1 cumulative events for socket 1864
. 2018-09-16 10:16:31.501 Handling network read event on socket 1864 with error 0
. 2018-09-16 10:16:31.502 Server offered these authentication methods: publickey,password
. 2018-09-16 10:16:31.502 Prompt (password, "SSH password", <no instructions>, "Mot de passe :")
. 2018-09-16 10:16:31.502 Using stored password.
. 2018-09-16 10:16:31.528 Sent password
. 2018-09-16 10:16:31.529 Waiting for the server to continue with the initialization
. 2018-09-16 10:16:31.529 Looking for incoming data
. 2018-09-16 10:16:31.529 Looking for network events
. 2018-09-16 10:16:31.587 Detected network event
. 2018-09-16 10:16:31.587 Enumerating network events for socket 1864
. 2018-09-16 10:16:31.588 Enumerated 1 network events making 1 cumulative events for socket 1864
. 2018-09-16 10:16:31.588 Handling network read event on socket 1864 with error 0
. 2018-09-16 10:16:31.588 Access granted
. 2018-09-16 10:16:31.588 Opening session as main channel
. 2018-09-16 10:16:31.588 Waiting for the server to continue with the initialization
. 2018-09-16 10:16:31.588 Looking for incoming data
. 2018-09-16 10:16:31.588 Looking for network events
. 2018-09-16 10:16:31.853 Detected network event
. 2018-09-16 10:16:31.853 Enumerating network events for socket 1864
. 2018-09-16 10:16:31.853 Enumerated 32 network events making 32 cumulative events for socket 1864
. 2018-09-16 10:16:31.853 Handling network close event on socket 1864 with error 10053
. 2018-09-16 10:16:31.853 Selecting events 0 for socket 1864
. 2018-09-16 10:16:31.854 Network error: Software caused connection abort
* 2018-09-16 10:16:31.909 (EFatal) Erreur réseau : le logiciel a provoqué un abandon de connexion
* 2018-09-16 10:16:31.909 Log d'authentification (voir le log de session pour les détails) :
* 2018-09-16 10:16:31.909 Utilisation du nom d'utilisateur "sftpuser".
* 2018-09-16 10:16:31.909 
* 2018-09-16 10:16:31.910 Erreur d'authentification

J'envisage de déplacer le /home sur ce nouveau disque , mais j'aurai préféré faire proprement et comprendre pourquoi ce truc tout bête ne fonctionne pas
Merci pour votre aide !
Alban

Dernière modification par afaverot (Le 17/09/2018, à 09:59)

Hors ligne

#2 Le 17/09/2018, à 09:58

afaverot

Re : [Workaround found] SFTP server ChRootDirectory sur autre disque

Cela ne motive personne je vois smile
Bon j'ai solutionner mon problème en déplaçant le /home sur ce nouveau disque monté en RAID.

Etrange..

Hors ligne